Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Override channel priority on installing. Add check for default channel. #4770

Merged
merged 6 commits into from
Nov 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 13 additions & 3 deletions .github/workflows/build_conda_linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -183,11 +183,21 @@ jobs:
${CONDA_RUN_SMOKE} conda install \
--yes \
--quiet \
-c "${CONDA_LOCAL_CHANNEL}" \
-c pytorch-"${CHANNEL}" \
-c nvidia \
-c "${CONDA_LOCAL_CHANNEL}" \
distr::"${PACKAGE_NAME}" \
${CONSTRAINTS}
-c defaults \
"${PACKAGE_NAME}" \
${CONSTRAINTS} \
--override-channels
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
--override-channels
--override-channels \
--strict-channel-priority

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ok Thank you let me try it

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Looks like override works better, strict failed to resolve some of the installs:
https://github.com/pytorch/test-infra/actions/runs/7040631634/job/19161895215?pr=4770


# check for installed package channel
CONDA_PKG=$(${CONDA_RUN_SMOKE} conda list | grep "${PACKAGE_NAME}" | grep "${CONDA_LOCAL_CHANNEL}")
if [[ -z "${CONDA_PKG}" ]]; then
${CONDA_RUN_SMOKE} conda list | grep "${PACKAGE_NAME}"
echo "${PACKAGE_NAME} is not installed from local channel"
exit 1
fi

if [[ ! -f "${{ inputs.repository }}"/${SMOKE_TEST_SCRIPT} ]]; then
echo "${{ inputs.repository }}/${SMOKE_TEST_SCRIPT} not found"
Expand Down
14 changes: 12 additions & 2 deletions .github/workflows/build_conda_macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -182,14 +182,24 @@ jobs:
export CONDA_RUN_SMOKE="conda run -p ${CONDA_ENV_SMOKE}"
export OLD_PATH=${PATH}
export PATH="${CONDA_ENV_SMOKE}/bin:${PATH}"

CONDA_LOCAL_CHANNEL="file://$(readlink -f ${{ inputs.repository }}/distr)"

${CONDA_RUN_SMOKE} conda install \
--quiet \
--yes \
-c "${CONDA_LOCAL_CHANNEL}" \
-c pytorch-${CHANNEL} \
"${PACKAGE_NAME}"
-c defaults \
"${PACKAGE_NAME}" \
"--override-channels"

# check for installed package channel
CONDA_PKG=$(${CONDA_RUN_SMOKE} conda list | grep "${PACKAGE_NAME}" | grep "${CONDA_LOCAL_CHANNEL}")
if [[ -z "${CONDA_PKG}" ]]; then
${CONDA_RUN_SMOKE} conda list | grep "${PACKAGE_NAME}"
echo "${PACKAGE_NAME} is not installed from local channel"
exit 1
fi

if [[ ! -f "${{ inputs.repository }}"/${SMOKE_TEST_SCRIPT} ]]; then
echo "${{ inputs.repository }}/${SMOKE_TEST_SCRIPT} not found"
Expand Down
16 changes: 13 additions & 3 deletions .github/workflows/build_conda_windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -203,11 +203,21 @@ jobs:
${CONDA_RUN_SMOKE} conda install \
--quiet \
--yes \
-c "${CONDA_LOCAL_CHANNEL}" \
-c pytorch-"${CHANNEL}" \
-c nvidia \
-c "${CONDA_LOCAL_CHANNEL}" \
distr::"${PACKAGE_NAME}" \
${CONSTRAINTS}
-c defaults \
"${PACKAGE_NAME}" \
${CONSTRAINTS} \
--override-channels

# fow windows we use BUILD_VERSION to validate the package
CONDA_PKG=$(${CONDA_RUN_SMOKE} conda list | grep "${PACKAGE_NAME}" | grep "${BUILD_VERSION}")
if [[ -z "${CONDA_PKG}" ]]; then
${CONDA_RUN_SMOKE} conda list | grep "${BUILD_VERSION}"
echo "${PACKAGE_NAME} is not installed with a correct version"
exit 1
fi

if [[ ! -f "${{ inputs.repository }}"/${SMOKE_TEST_SCRIPT} ]]; then
echo "${{ inputs.repository }}/${SMOKE_TEST_SCRIPT} not found"
Expand Down
Loading