File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -109,9 +109,13 @@ if pip show torch &>/dev/null; then
109109 echo " **** PyTorch is already installed. Current commit is $PYTORCH_CURRENT_COMMIT ****"
110110 if [ " $BUILD_LATEST " = false ]; then
111111 if [[ " $PYTORCH_PINNED_COMMIT " = " $PYTORCH_CURRENT_COMMIT " * ]]; then
112- echo " **** PyTorch is already installed and its current commit is equal to the pinned commit: $PYTORCH_PINNED_COMMIT . ****"
113- echo " **** There is no need to build anything, just exit. ****"
114- exit 0
112+ if [ " $FORCE_REINSTALL " = true ]; then
113+ echo " **** Matching pinned commit ($PYTORCH_PINNED_COMMIT ) detected but --force-reinstall specified: proceeding with rebuild. ****"
114+ else
115+ echo " **** PyTorch is already installed and its current commit matches the pinned commit: $PYTORCH_PINNED_COMMIT . ****"
116+ echo " **** There is no need to build anything, exiting. ****"
117+ exit 0
118+ fi
115119 else
116120 echo " **** Current PyTorch commit $PYTORCH_CURRENT_COMMIT ****"
117121 echo " **** Pinned PyTorch commit $PYTORCH_PINNED_COMMIT ****"
You can’t perform that action at this time.
0 commit comments