@@ -101,8 +101,7 @@ slow_tests_8x: test_installs
101101 exit $$((status1 + status2 ) )
102102
103103# Run DeepSpeed non-regression tests
104- slow_tests_deepspeed : test_installs
105- python -m pip install git+https://github.com/HabanaAI/DeepSpeed.git@1.21.0
104+ slow_tests_deepspeed : test_installs install_deepspeed
106105 python -m pytest tests/test_examples.py -v -s -k " deepspeed"
107106
108107slow_tests_diffusers : test_installs
@@ -113,10 +112,9 @@ slow_tests_sentence_transformers: test_installs
113112 python -m pytest tests/test_sentence_transformers.py -v -s
114113
115114# Run all text-generation non-regression tests
116- slow_tests_text_generation_example : test_installs
115+ slow_tests_text_generation_example : test_installs install_deepspeed
117116 python -m pip install -r examples/text-generation/requirements_awq.txt
118117 BUILD_CUDA_EXT=0 python -m pip install -vvv --no-build-isolation git+https://github.com/HabanaAI/AutoGPTQ.git
119- python -m pip install git+https://github.com/HabanaAI/DeepSpeed.git@1.21.0
120118 python -m pip install tiktoken blobfile
121119 python -m pytest tests/test_text_generation_example.py tests/test_encoder_decoder.py -v -s --token $(TOKEN )
122120
@@ -127,18 +125,15 @@ slow_tests_text_generation_example_1x: test_installs
127125 python -m pytest tests/test_text_generation_example.py tests/test_encoder_decoder.py -m " (not x2) and (not x4) and (not x8)" -v -s --token $(TOKEN )
128126
129127# Run subset of text-generation non-regression tests that require 2 Gaudi cards
130- slow_tests_text_generation_example_2x : test_installs
131- python -m pip install git+https://github.com/HabanaAI/DeepSpeed.git@1.21.0
128+ slow_tests_text_generation_example_2x : test_installs install_deepspeed
132129 python -m pytest tests/test_text_generation_example.py -m x2 -v -s --token $(TOKEN )
133130
134131# Run subset of text-generation non-regression tests that require 4 Gaudi cards
135- slow_tests_text_generation_example_4x : test_installs
136- python -m pip install git+https://github.com/HabanaAI/DeepSpeed.git@1.21.0
132+ slow_tests_text_generation_example_4x : test_installs install_deepspeed
137133 python -m pytest tests/test_text_generation_example.py -m x4 -v -s --token $(TOKEN )
138134
139135# Run subset of text-generation non-regression tests that require 8 Gaudi cards
140- slow_tests_text_generation_example_8x : test_installs
141- python -m pip install git+https://github.com/HabanaAI/DeepSpeed.git@1.21.0
136+ slow_tests_text_generation_example_8x : test_installs install_deepspeed
142137 python -m pytest tests/test_text_generation_example.py -m x8 -v -s --token $(TOKEN )
143138
144139# Run image-to-text non-regression tests
@@ -225,3 +220,10 @@ clean:
225220
226221test_installs :
227222 python -m pip install .[tests]
223+
224+ DEEPSPEED_SPEC ?= git+https://github.com/HabanaAI/DeepSpeed.git@1.21.0
225+
226+ install_deepspeed :
227+ @set -eu
228+ @echo " Installing DeepSpeed (customizable via DEEPSPEED_SPEC env var)"
229+ python -m pip install --upgrade --prefer-binary " $( DEEPSPEED_SPEC) "
0 commit comments