From 40658be4615d7d30ad6519618ee984cdba263098 Mon Sep 17 00:00:00 2001 From: Yih-Dar <2521628+ydshieh@users.noreply.github.com> Date: Tue, 6 Feb 2024 21:00:42 +0100 Subject: [PATCH] Hotfix - make `torchaudio` get the correct version in `torch_and_flax_job` (#28899) * check * check * check --------- Co-authored-by: ydshieh --- .circleci/create_circleci_config.py | 4 ++++ .../test_modeling_fastspeech2_conformer.py | 2 ++ 2 files changed, 6 insertions(+) diff --git a/.circleci/create_circleci_config.py b/.circleci/create_circleci_config.py index 0107d95ebad9..3fa6da7a653f 100644 --- a/.circleci/create_circleci_config.py +++ b/.circleci/create_circleci_config.py @@ -299,6 +299,8 @@ def job_name(self): "pip install -U --upgrade-strategy eager --upgrade pip", "pip install -U --upgrade-strategy eager .[sklearn,flax,torch,testing,sentencepiece,torch-speech,vision]", "pip install -U --upgrade-strategy eager -e git+https://github.com/huggingface/accelerate@main#egg=accelerate", + # TODO: remove this one after fixing the dependency issue(s) above + "pip install -U --upgrade-strategy eager torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu" ], marker="is_pt_flax_cross_test", pytest_options={"rA": None, "durations": 0}, @@ -312,6 +314,8 @@ def job_name(self): "pip install --upgrade --upgrade-strategy eager pip", "pip install -U --upgrade-strategy eager .[sklearn,torch,testing,sentencepiece,torch-speech,vision,timm]", "pip install -U --upgrade-strategy eager -e git+https://github.com/huggingface/accelerate@main#egg=accelerate", + # TODO: remove this one after fixing the dependency issue(s) above + "pip install -U --upgrade-strategy eager torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu" ], parallelism=1, pytest_num_workers=6, diff --git a/tests/models/fastspeech2_conformer/test_modeling_fastspeech2_conformer.py b/tests/models/fastspeech2_conformer/test_modeling_fastspeech2_conformer.py index 7a4ec2c723b4..ce6bc4218ae3 100644 --- a/tests/models/fastspeech2_conformer/test_modeling_fastspeech2_conformer.py +++ b/tests/models/fastspeech2_conformer/test_modeling_fastspeech2_conformer.py @@ -533,6 +533,8 @@ def prepare_config_and_inputs_for_common(self): return config, inputs_dict +@require_torch_accelerator +@require_torch class FastSpeech2ConformerWithHifiGanTest(ModelTesterMixin, unittest.TestCase): all_model_classes = (FastSpeech2ConformerWithHifiGan,) if is_torch_available() else () test_pruning = False