Skip to content

Commit

Permalink
CI: Refactor CLEAR_CACHE -> DISABLE_CACHE
Browse files Browse the repository at this point in the history
  • Loading branch information
AnirudhDagar committed May 10, 2023
1 parent 9fb2898 commit 1e8158b
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflow_scripts/build_jax.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ source $(dirname "$0")/utils.sh
d2lbook build outputcheck tabcheck

# Move aws copy commands for cache restore outside
if [ "$CLEAR_CACHE" = "false" ]; then
if [ "$DISABLE_CACHE" = "false" ]; then
echo "Retrieving jax build cache from "$CACHE_DIR""
measure_command_time "aws s3 sync s3://preview.d2l.ai/"$CACHE_DIR"/"$REPO_NAME"-"$TARGET_BRANCH"/_build/eval_jax/ _build/eval_jax/ --delete --quiet --exclude 'data/*'"
fi
Expand Down
2 changes: 1 addition & 1 deletion .github/workflow_scripts/build_mxnet.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ source $(dirname "$0")/utils.sh
d2lbook build outputcheck tabcheck

# Move aws copy commands for cache restore outside
if [ "$CLEAR_CACHE" = "false" ]; then
if [ "$DISABLE_CACHE" = "false" ]; then
echo "Retrieving mxnet build cache from "$CACHE_DIR""
measure_command_time "aws s3 sync s3://preview.d2l.ai/"$CACHE_DIR"/"$REPO_NAME"-"$TARGET_BRANCH"/_build/eval_mxnet/ _build/eval_mxnet/ --delete --quiet --exclude 'data/*'"
fi
Expand Down
2 changes: 1 addition & 1 deletion .github/workflow_scripts/build_pytorch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ source $(dirname "$0")/utils.sh
d2lbook build outputcheck tabcheck

# Move aws copy commands for cache restore outside
if [ "$CLEAR_CACHE" = "false" ]; then
if [ "$DISABLE_CACHE" = "false" ]; then
echo "Retrieving pytorch build cache from "$CACHE_DIR""
measure_command_time "aws s3 sync s3://preview.d2l.ai/"$CACHE_DIR"/"$REPO_NAME"-"$TARGET_BRANCH"/_build/eval _build/eval --delete --quiet --exclude 'data/*'"
echo "Retrieving pytorch slides cache from "$CACHE_DIR""
Expand Down
2 changes: 1 addition & 1 deletion .github/workflow_scripts/build_tf.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ source $(dirname "$0")/utils.sh
d2lbook build outputcheck tabcheck

# Move aws copy commands for cache restore outside
if [ "$CLEAR_CACHE" = "false" ]; then
if [ "$DISABLE_CACHE" = "false" ]; then
echo "Retrieving tensorflow build cache from "$CACHE_DIR""
measure_command_time "aws s3 sync s3://preview.d2l.ai/"$CACHE_DIR"/"$REPO_NAME"-"$TARGET_BRANCH"/_build/eval_tensorflow/ _build/eval_tensorflow/ --delete --quiet --exclude 'data/*'"
fi
Expand Down
4 changes: 2 additions & 2 deletions .github/workflow_scripts/utils.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash

# Default value for CLEAR_CACHE
CLEAR_CACHE=false # Eg. 'true' or 'false'
# By default, all builds are cached
DISABLE_CACHE=false # Eg. 'true' or 'false'


# Function to measure command execution time
Expand Down

0 comments on commit 1e8158b

Please sign in to comment.