Skip to content

Commit 418a295

Browse files
yucufacebook-github-bot
authored andcommitted
Add pip cache purge to install_via_pip (meta-pytorch#1300)
Summary: Pull Request resolved: meta-pytorch#1300 We occasionally hit hash mismatch error in Github tests. Although it usually can be solve with a rerun, it's still a waste of time. Hopefully purge pip cache before install anything can ensure that we won't see this error anymore. Reviewed By: cyrjano Differential Revision: D58955033 fbshipit-source-id: 96fb0c1ce60eddb2d2d340328b4efe2f5b86faa4
1 parent 103c742 commit 418a295

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

scripts/install_via_pip.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@ sudo apt install yarn
3434
# yarn needs terminal info
3535
export TERM=xterm
3636

37+
# Remove all items from pip cache to avoid hash mismatch
38+
pip cache purge
39+
3740
# upgrade pip
3841
pip install --upgrade pip --progress-bar off
3942

@@ -54,7 +57,7 @@ else
5457
if [[ $CHOSEN_TORCH_VERSION == -1 ]]; then
5558
pip install --upgrade torch --progress-bar off
5659
else
57-
pip install torch==$CHOSEN_TORCH_VERSION --progress-bar off
60+
pip install torch=="$CHOSEN_TORCH_VERSION" --progress-bar off
5861
fi
5962
fi
6063

0 commit comments

Comments
 (0)