From 86f2569738793f9fa45e55f1047a70399bf3c2ad Mon Sep 17 00:00:00 2001 From: Zach Mueller Date: Thu, 25 Apr 2024 09:37:55 -0400 Subject: [PATCH] Make accelerate install non-torch dependent (#30463) * Pin accelerate w/o eager * Eager * Update .circleci/create_circleci_config.py Co-authored-by: amyeroberts <22614925+amyeroberts@users.noreply.github.com> * Expound * Expound squared * PyTorch -> dependency --------- Co-authored-by: amyeroberts <22614925+amyeroberts@users.noreply.github.com> --- .circleci/create_circleci_config.py | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/.circleci/create_circleci_config.py b/.circleci/create_circleci_config.py index d29a18a5c34fdf..2c5a0738bf5a6f 100644 --- a/.circleci/create_circleci_config.py +++ b/.circleci/create_circleci_config.py @@ -285,7 +285,8 @@ def job_name(self): "pip install --upgrade --upgrade-strategy eager pip", "pip install -U --upgrade-strategy eager .[sklearn,tf-cpu,torch,testing,sentencepiece,torch-speech,vision]", "pip install -U --upgrade-strategy eager tensorflow_probability", - "pip install -U --upgrade-strategy eager -e git+https://github.com/huggingface/accelerate@main#egg=accelerate", + # Without --no-deps we can't pin dependency versions in the future + "pip install -U --upgrade-strategy eager --no-deps -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", ], @@ -301,7 +302,8 @@ def job_name(self): "sudo apt-get -y update && sudo apt-get install -y libsndfile1-dev espeak-ng", "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", + # Without --no-deps we can't pin dependency versions in the future + "pip install -U --upgrade-strategy eager --no-deps -e git+https://github.com/huggingface/accelerate@main#egg=accelerate", ], marker="is_pt_flax_cross_test", pytest_options={"rA": None, "durations": 0}, @@ -314,7 +316,8 @@ def job_name(self): "sudo apt-get -y update && sudo apt-get install -y libsndfile1-dev espeak-ng time", "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", + # Without --no-deps we can't pin dependency versions in the future + "pip install -U --upgrade-strategy eager --no-deps -e git+https://github.com/huggingface/accelerate@main#egg=accelerate", ], parallelism=1, pytest_num_workers=12, @@ -408,7 +411,8 @@ def job_name(self): "pip install --upgrade --upgrade-strategy eager pip", "pip install -U --upgrade-strategy eager .[sklearn,torch,sentencepiece,testing,torch-speech]", "pip install -U --upgrade-strategy eager -r examples/pytorch/_tests_requirements.txt", - "pip install -U --upgrade-strategy eager -e git+https://github.com/huggingface/accelerate@main#egg=accelerate", + # Without --no-deps we can't pin dependency versions in the future + "pip install -U --upgrade-strategy eager --no-deps -e git+https://github.com/huggingface/accelerate@main#egg=accelerate", ], pytest_num_workers=1, ) @@ -520,7 +524,8 @@ def job_name(self): "sudo apt-get -y update && sudo apt-get install -y libsndfile1-dev espeak-ng time ffmpeg", "pip install --upgrade --upgrade-strategy eager pip", "pip install -U --upgrade-strategy eager -e .[dev]", - "pip install -U --upgrade-strategy eager -e git+https://github.com/huggingface/accelerate@main#egg=accelerate", + # Without --no-deps we can't pin dependency versions in the future + "pip install -U --upgrade-strategy eager --no-deps -e git+https://github.com/huggingface/accelerate@main#egg=accelerate", "pip install --upgrade --upgrade-strategy eager 'pytest<8.0.0' pytest-sugar", "pip install -U --upgrade-strategy eager natten==0.15.1+torch210cpu -f https://shi-labs.com/natten/wheels", "pip install -U --upgrade-strategy eager g2p-en",