Skip to content

Commit 222f291

Browse files
authored
Use 2.7 as stable (#3345)
* Use 2.7 as stable * Disable memory_format tutorial as it causes issue with the torch_logs.py tutorial.
1 parent 960ef1d commit 222f291

File tree

4 files changed

+13
-16
lines changed

4 files changed

+13
-16
lines changed

.ci/docker/requirements.txt

+3-3
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ tqdm==4.66.1
1414
numpy==1.24.4
1515
matplotlib
1616
librosa
17-
torch==2.6
17+
torch==2.7
1818
torchvision
1919
torchdata
2020
networkx
@@ -67,7 +67,7 @@ iopath
6767
pygame==2.6.0
6868
pycocotools
6969
semilearn==0.3.2
70-
torchao==0.5.0
70+
torchao==0.10.0
7171
segment_anything==1.0
7272
torchrec==1.1.0; platform_system == "Linux"
73-
fbgemm-gpu==1.1.0; platform_system == "Linux"
73+
fbgemm-gpu==1.2.0; platform_system == "Linux"

.jenkins/build.sh

+2-5
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,10 @@ sudo apt-get install -y pandoc
2222
#Install PyTorch Nightly for test.
2323
# Nightly - pip install --pre torch torchvision torchaudio -f https://download.pytorch.org/whl/nightly/cu102/torch_nightly.html
2424
# Install 2.5 to merge all 2.4 PRs - uncomment to install nightly binaries (update the version as needed).
25-
# sudo pip uninstall -y torch torchvision torchaudio torchtext torchdata
26-
# sudo pip3 install torch==2.6.0 torchvision --no-cache-dir --index-url https://download.pytorch.org/whl/test/cu124
2725
# sudo pip uninstall -y fbgemm-gpu torchrec
26+
# sudo pip uninstall -y torch torchvision torchaudio torchtext torchdata torchrl tensordict
2827
# sudo pip3 install fbgemm-gpu==1.1.0 torchrec==1.0.0 --no-cache-dir --index-url https://download.pytorch.org/whl/test/cu124
29-
sudo pip uninstall -y torch torchvision torchaudio torchtext torchdata torchrl tensordict
30-
pip3 install torch==2.7.0 torchvision torchaudio --no-cache-dir --index-url https://download.pytorch.org/whl/test/cu126
31-
#sudo pip uninstall -y fbgemm-gpu
28+
# pip3 install torch==2.7.0 torchvision torchaudio --no-cache-dir --index-url https://download.pytorch.org/whl/test/cu126
3229
# Install two language tokenizers for Translation with TorchText tutorial
3330
python -m spacy download en_core_web_sm
3431
python -m spacy download de_core_news_sm

.jenkins/validate_tutorials_built.py

+2-8
Original file line numberDiff line numberDiff line change
@@ -51,14 +51,8 @@
5151
"intermediate_source/text_to_speech_with_torchaudio",
5252
"intermediate_source/tensorboard_profiler_tutorial", # reenable after 2.0 release.
5353
"advanced_source/semi_structured_sparse", # reenable after 3303 is fixed.
54-
"intermediate_source/mario_rl_tutorial", # reenable after 3302 is fixed
55-
"intermediate_source/reinforcement_ppo", # reenable after 3302 is fixed
56-
"intermediate_source/pinmem_nonblock", # reenable after 3302 is fixed
57-
"intermediate_source/dqn_with_rnn_tutorial", # reenable after 3302 is fixed
58-
"advanced_source/pendulum", # reenable after 3302 is fixed
59-
"advanced_source/coding_ddpg", # reenable after 3302 is fixed
60-
"intermediate_source/torchrec_intro_tutorial", # reenable after 3302 is fixed
61-
"recipes_source/recipes/reasoning_about_shapes" # reenable after 3326 is fixed
54+
"intermediate_source/torchrec_intro_tutorial", # reenable after 3302 is fixe
55+
"intermediate_source/memory_format_tutorial", # causes other tutorials like torch_logs fail. "state" issue, reseting dynamo didn't help
6256
]
6357

6458
def tutorial_source_dirs() -> List[Path]:

conf.py

+6
Original file line numberDiff line numberDiff line change
@@ -99,10 +99,16 @@
9999

100100
def reset_seeds(gallery_conf, fname):
101101
torch.cuda.empty_cache()
102+
torch.backends.cudnn.deterministic = True
103+
torch.backends.cudnn.benchmark = False
104+
torch._dynamo.reset()
105+
torch._inductor.config.force_disable_caches = True
102106
torch.manual_seed(42)
103107
torch.set_default_device(None)
104108
random.seed(10)
105109
numpy.random.seed(10)
110+
torch.set_grad_enabled(True)
111+
106112
gc.collect()
107113

108114
sphinx_gallery_conf = {

0 commit comments

Comments
 (0)