Skip to content

Commit

Permalink
fix torch compile tests in OSS (#479)
Browse files Browse the repository at this point in the history
Summary:
Pull Request resolved: #479

module.compile is only in pytorch nightlies, and it seems the nightly pytorch is being overrided by the stable torch package in `requirements.txt`, so filtering out torch in the github workflows

Reviewed By: ananthsub

Differential Revision: D47803991

fbshipit-source-id: 42ad001e3a22e0d20bde341c047ba05c185ccd32
  • Loading branch information
JKSenthil authored and facebook-github-bot committed Jul 26, 2023
1 parent fe9ea1c commit 8f0a429
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 10 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build_docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
set -eux
conda activate test
conda install pytorch cpuonly -c pytorch-nightly
pip install -r requirements.txt
pip install $(grep -v '^ *#\|^torch' requirements.txt | grep .)
pip install -r dev-requirements.txt
python setup.py sdist bdist_wheel
pip install dist/*.whl
Expand All @@ -36,7 +36,7 @@ jobs:
set -eux
conda activate test
cd docs
pip install -r requirements.txt
pip install $(grep -v '^ *#\|^torch' requirements.txt | grep .)
make html
touch build/html/.nojekyll
cd ..
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/nightly_build_cpu.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
set -eux
conda activate test
conda install pytorch cpuonly -c pytorch-nightly
pip install -r requirements.txt
pip install $(grep -v '^ *#\|^torch' requirements.txt | grep .)
python setup.py sdist bdist_wheel
pip install dist/*.whl
pip install -r dev-requirements.txt
Expand Down Expand Up @@ -61,7 +61,7 @@ jobs:
set -eux
conda activate test
conda install pytorch cpuonly -c pytorch-nightly
pip install -r requirements.txt
pip install $(grep -v '^ *#\|^torch' requirements.txt | grep .)
pip install --no-build-isolation -e ".[dev]"
- name: Upload to PyPI
shell: bash -l {0}
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/release_build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
set -eux
conda activate test
conda install pytorch cpuonly -c pytorch-nightly
pip install -r requirements.txt
pip install $(grep -v '^ *#\|^torch' requirements.txt | grep .)
python setup.py sdist bdist_wheel
pip install dist/*.whl
pip install -r dev-requirements.txt
Expand Down Expand Up @@ -53,7 +53,7 @@ jobs:
set -eux
conda activate test
conda install pytorch cpuonly -c pytorch-nightly
pip install -r requirements.txt
pip install $(grep -v '^ *#\|^torch' requirements.txt | grep .)
pip install --no-build-isolation -e ".[dev]"
- name: Upload to PyPI
shell: bash -l {0}
Expand Down Expand Up @@ -82,7 +82,7 @@ jobs:
set -eux
conda activate test
conda install pytorch cpuonly -c pytorch-nightly
pip install -r requirements.txt
pip install $(grep -v '^ *#\|^torch' requirements.txt | grep .)
pip install -r dev-requirements.txt
python setup.py sdist bdist_wheel
pip install dist/*.whl
Expand All @@ -92,7 +92,7 @@ jobs:
set -eux
conda activate test
cd docs
pip install -r requirements.txt
pip install $(grep -v '^ *#\|^torch' requirements.txt | grep .)
RELEASE_BUILD=1 make html
touch build/html/.nojekyll
cd ..
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
set -eux
conda activate test
conda install pytorch cpuonly -c pytorch-nightly
pip install -r requirements.txt
pip install $(grep -v '^ *#\|^torch' requirements.txt | grep .)
pip install -r dev-requirements.txt
pip install --no-build-isolation -e .
- name: Run unit tests with coverage
Expand Down
1 change: 0 additions & 1 deletion tests/framework/test_auto_unit.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
COMPILE_AVAIL = False
if is_torch_version_geq_1_13():
COMPILE_AVAIL = True
import torch._dynamo

from torch.distributed import GradBucket, launcher
from torch.distributed.fsdp import FullyShardedDataParallel as FSDP
Expand Down

0 comments on commit 8f0a429

Please sign in to comment.