-
Notifications
You must be signed in to change notification settings - Fork 7.2k
[Nova] Add GHA Linux CPU Unittests for Torchvision #6759
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
Merged
Merged
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
4f9a4a9
[Nova][WIP] Add Linux CPU Unittests for Torchvision
osalpekar 038a1c3
use conda-builder image since conda installation is needed
osalpekar 8770800
install torch dep with conda instead
osalpekar f12310b
use circleCI command to run tests
osalpekar 360069e
larger instance to avoid OOM issues
osalpekar e894142
proper syntax for self-hosted runners
osalpekar 8c51fd5
4xlarge instance
osalpekar 20d30e2
8xlarge
osalpekar 02b1dd4
12xlarge
osalpekar 7b0e1a5
use setup-miniconda job
osalpekar 86a8314
add back PATH change to help setup py detect conda
osalpekar 5b36d4d
run conda shell script
osalpekar 9a6115c
install other deps up front
osalpekar 2336c08
git config and undo path change
osalpekar f3061eb
revert to local conda install
osalpekar 3262441
conda-builder image
osalpekar a37225b
support for whole python version matrix
osalpekar 2167e0b
clean up the conda env once we are done with the job
osalpekar File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,69 @@ | ||
| name: Unit-tests on Linux CPU | ||
|
|
||
| on: | ||
| pull_request: | ||
| push: | ||
| branches: | ||
| - nightly | ||
| - main | ||
| - release/* | ||
| workflow_dispatch: | ||
|
|
||
| env: | ||
| CHANNEL: "nightly" | ||
|
|
||
| jobs: | ||
| tests: | ||
| name: "Unit-tests on Linux CPU" | ||
| runs-on: [self-hosted, linux.12xlarge] | ||
| container: | ||
| image: pytorch/conda-builder:cpu | ||
| strategy: | ||
| matrix: | ||
| py_vers: ["3.7", "3.8", "3.9", "3.10"] | ||
|
|
||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v2 | ||
| - name: Set Release CHANNEL (for release) | ||
| if: ${{ (github.event_name == 'pull_request' && startsWith(github.base_ref, 'release')) || startsWith(github.ref, 'refs/heads/release') }} | ||
| run: | | ||
| echo "CHANNEL=test" >> "$GITHUB_ENV" | ||
| - name: Setup Conda | ||
| shell: bash -l {0} | ||
| env: | ||
| ENV_NAME: conda-env-${{ github.run_id }} | ||
| PY_VERS: ${{ matrix.py_vers }} | ||
| run: | | ||
| git config --global --add safe.directory /__w/vision/vision | ||
| . ~/miniconda3/etc/profile.d/conda.sh | ||
| conda create -yp ${ENV_NAME} python=${PY_VERS} numpy libpng jpeg scipy | ||
| echo "CONDA_RUN=conda run -p ${ENV_NAME}" >> "$GITHUB_ENV" | ||
| - name: Install TorchVision | ||
| shell: bash -l {0} | ||
| env: | ||
| VERSION: cpu | ||
| CUDATOOLKIT: cpuonly | ||
| run: | | ||
| # Needed for JPEG library detection as setup.py detects conda presence | ||
| # by running `shutil.which('conda')` | ||
| export PATH=~/miniconda3/bin:$PATH | ||
| set -ex | ||
| ${CONDA_RUN} conda install \ | ||
| --yes \ | ||
| -c "pytorch-${CHANNEL}" \ | ||
| -c nvidia "pytorch-${CHANNEL}"::pytorch[build="*${VERSION}*"] \ | ||
| "${CUDATOOLKIT}" | ||
| ${CONDA_RUN} python3 setup.py develop | ||
| ${CONDA_RUN} python3 -m pip install pytest pytest-mock av | ||
| - name: Run tests | ||
| shell: bash -l {0} | ||
| env: | ||
| ENV_NAME: conda-env-${{ github.run_id }} | ||
| PY_VERS: ${{ matrix.py_vers }} | ||
| run: | | ||
| . ~/miniconda3/etc/profile.d/conda.sh | ||
| set -ex | ||
| ${CONDA_RUN} python3 -m torch.utils.collect_env | ||
| ${CONDA_RUN} python3 -m pytest --junitxml=test-results/junit.xml -v --durations 20 | ||
| conda env remove -p ${ENV_NAME} | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.