Skip to content

[one-cmds] Skip default torch extra-index-url#16480

Closed
mhs4670go wants to merge 1 commit intoSamsung:masterfrom
mhs4670go:fix
Closed

[one-cmds] Skip default torch extra-index-url#16480
mhs4670go wants to merge 1 commit intoSamsung:masterfrom
mhs4670go:fix

Conversation

@mhs4670go
Copy link
Copy Markdown
Collaborator

This commit skips default torch option when ONE_PREPVENV_PIP_OPTION is set.

ONE-DCO-1.0-Signed-off-by: seongwoo mhs4670go@naver.com

This commit skips default torch option when ONE_PREPVENV_PIP_OPTION is set.

ONE-DCO-1.0-Signed-off-by: seongwoo <mhs4670go@naver.com>
@mhs4670go mhs4670go requested a review from a team April 14, 2026 07:43
@mhs4670go mhs4670go added the PR/ready for review It is ready to review. Please review it. label Apr 14, 2026
Copy link
Copy Markdown
Contributor

@shs-park shs-park left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I left a comment, PTAL
=)

Comment on lines +99 to +108
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}'"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for the record, ONE_PREPVENV_TORCH_SOURCE was to override the torch source URL to internal package server for CI and for inhouse developres.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@mhs4670go mhs4670go closed this Apr 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

PR/ready for review It is ready to review. Please review it.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants