Skip to content

Commit c8b6052

Browse files
authored
Final fix of the accelerate installation issue (#27408)
* fix * [test-all] commit * fix * [test-all] commit * [test-all] commit * fix * fix * fix * fix * fix --------- Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
1 parent c5037b4 commit c8b6052

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

.circleci/create_circleci_config.py

+5-4
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ def job_name(self):
283283
"pip install --upgrade --upgrade-strategy eager pip",
284284
"pip install -U --upgrade-strategy eager .[sklearn,tf-cpu,torch,testing,sentencepiece,torch-speech,vision]",
285285
"pip install -U --upgrade-strategy eager tensorflow_probability",
286-
"pip install -U -e --upgrade-strategy eager git+https://github.com/huggingface/accelerate@main#egg=accelerate",
286+
"pip install -U --upgrade-strategy eager -e git+https://github.com/huggingface/accelerate@main#egg=accelerate",
287287
],
288288
marker="is_pt_tf_cross_test",
289289
pytest_options={"rA": None, "durations": 0},
@@ -297,7 +297,7 @@ def job_name(self):
297297
"sudo apt-get -y update && sudo apt-get install -y libsndfile1-dev espeak-ng",
298298
"pip install -U --upgrade-strategy eager --upgrade pip",
299299
"pip install -U --upgrade-strategy eager .[sklearn,flax,torch,testing,sentencepiece,torch-speech,vision]",
300-
"pip install -U --upgrade-strategy eager git+https://github.com/huggingface/accelerate",
300+
"pip install -U --upgrade-strategy eager -e git+https://github.com/huggingface/accelerate@main#egg=accelerate",
301301
],
302302
marker="is_pt_flax_cross_test",
303303
pytest_options={"rA": None, "durations": 0},
@@ -310,7 +310,7 @@ def job_name(self):
310310
"sudo apt-get -y update && sudo apt-get install -y libsndfile1-dev espeak-ng time",
311311
"pip install --upgrade --upgrade-strategy eager pip",
312312
"pip install -U --upgrade-strategy eager .[sklearn,torch,testing,sentencepiece,torch-speech,vision,timm]",
313-
"pip install -U --upgrade-strategy eager git+https://github.com/huggingface/accelerate",
313+
"pip install -U --upgrade-strategy eager -e git+https://github.com/huggingface/accelerate@main#egg=accelerate",
314314
],
315315
parallelism=1,
316316
pytest_num_workers=6,
@@ -403,6 +403,7 @@ def job_name(self):
403403
"pip install --upgrade --upgrade-strategy eager pip",
404404
"pip install -U --upgrade-strategy eager .[sklearn,torch,sentencepiece,testing,torch-speech]",
405405
"pip install -U --upgrade-strategy eager -r examples/pytorch/_tests_requirements.txt",
406+
"pip install -U --upgrade-strategy eager -e git+https://github.com/huggingface/accelerate@main#egg=accelerate",
406407
],
407408
)
408409

@@ -510,7 +511,7 @@ def job_name(self):
510511
"sudo apt-get -y update && sudo apt-get install -y libsndfile1-dev espeak-ng time ffmpeg",
511512
"pip install --upgrade --upgrade-strategy eager pip",
512513
"pip install -U --upgrade-strategy eager -e .[dev]",
513-
"pip install -U --upgrade-strategy eager git+https://github.com/huggingface/accelerate",
514+
"pip install -U --upgrade-strategy eager -e git+https://github.com/huggingface/accelerate@main#egg=accelerate",
514515
"pip install --upgrade --upgrade-strategy eager pytest pytest-sugar",
515516
"pip install -U --upgrade-strategy eager natten",
516517
"find -name __pycache__ -delete",

examples/pytorch/test_accelerate_examples.py

+3
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
import shutil
2222
import sys
2323
import tempfile
24+
import unittest
2425
from unittest import mock
2526

2627
from accelerate.utils import write_basic_config
@@ -98,6 +99,7 @@ def test_run_glue_no_trainer(self):
9899
self.assertTrue(os.path.exists(os.path.join(tmp_dir, "epoch_0")))
99100
self.assertTrue(os.path.exists(os.path.join(tmp_dir, "glue_no_trainer")))
100101

102+
@unittest.skip("Zach is working on this.")
101103
@mock.patch.dict(os.environ, {"WANDB_MODE": "offline"})
102104
def test_run_clm_no_trainer(self):
103105
tmp_dir = self.get_auto_remove_tmp_dir()
@@ -125,6 +127,7 @@ def test_run_clm_no_trainer(self):
125127
self.assertTrue(os.path.exists(os.path.join(tmp_dir, "epoch_0")))
126128
self.assertTrue(os.path.exists(os.path.join(tmp_dir, "clm_no_trainer")))
127129

130+
@unittest.skip("Zach is working on this.")
128131
@mock.patch.dict(os.environ, {"WANDB_MODE": "offline"})
129132
def test_run_mlm_no_trainer(self):
130133
tmp_dir = self.get_auto_remove_tmp_dir()

0 commit comments

Comments
 (0)