[one-cmds] Skip default torch extra-index-url#16480
[one-cmds] Skip default torch extra-index-url#16480mhs4670go wants to merge 1 commit intoSamsung:masterfrom
Conversation
This commit skips default torch option when ONE_PREPVENV_PIP_OPTION is set. ONE-DCO-1.0-Signed-off-by: seongwoo <mhs4670go@naver.com>
shs-park
left a comment
There was a problem hiding this comment.
I left a comment, PTAL
=)
| TORCH_SOURCE_OPTION="" | ||
| if [[ -n "$ONE_PREPVENV_PIP_OPTION" ]]; then | ||
| echo "ONE_PREPVENV_PIP_OPTION is set; skipping default torch source option." | ||
| elif [[ -n "$ONE_PREPVENV_TORCH_SOURCE" ]]; then | ||
| TORCH_SOURCE_OPTION="${ONE_PREPVENV_TORCH_SOURCE}" | ||
| else | ||
| TORCH_SOURCE_OPTION="--extra-index-url https://download.pytorch.org/whl/cpu" | ||
| fi | ||
| # TODO remove torch message | ||
| echo "Torch from '${ONE_PREPVENV_TORCH_SOURCE}' -> '${TORCH_SOURCE_OPTION}'" | ||
|
|
||
| echo "Torch source option: '${TORCH_SOURCE_OPTION}'" |
There was a problem hiding this comment.
The control flow looks clearer than before, and skipping the default torch index when ONE_PREPVENV_PIP_OPTION is explicitly set makes sense.
One thing I want to confirm is whether it is intended to ignore ONE_PREPVENV_TORCH_SOURCE entirely whenever ONE_PREPVENV_PIP_OPTION is set.
There was a problem hiding this comment.
for the record, ONE_PREPVENV_TORCH_SOURCE was to override the torch source URL to internal package server for CI and for inhouse developres.
There was a problem hiding this comment.
Ah, I mistakenly saw both were same option: ONE_PREPVENV_PIP_OPTION and ONE_PREPVENV_TORCH_SOURCE. I think I can ignore TORCH_SOURCE_OPTION with current codes.
Let's close this PR.
This commit skips default torch option when ONE_PREPVENV_PIP_OPTION is set.
ONE-DCO-1.0-Signed-off-by: seongwoo mhs4670go@naver.com