diff --git a/Makefile b/Makefile index 5ded6b7400..a3bfa1fd65 100644 --- a/Makefile +++ b/Makefile @@ -44,7 +44,7 @@ fast_tests: fast_tests_diffusers: python -m pip install .[tests] python -m pip install -r examples/stable-diffusion/requirements.txt - PT_HPU_LAZY_MODE=1 python -m pytest tests/test_diffusers.py + python -m pytest tests/test_diffusers.py # Run single-card non-regression tests on image classification models fast_tests_image_classifications: @@ -102,15 +102,8 @@ slow_tests_deepspeed: test_installs python -m pytest tests/test_examples.py -v -s -k "deepspeed" slow_tests_diffusers: test_installs - @status1=0; status2=0; status3=0; status4=0; status5=0; \ python -m pip install -r examples/stable-diffusion/requirements.txt; \ - python -m pytest tests/test_diffusers.py -v -s -k "textual_inversion" || status1=$$?; \ - python -m pip install peft==0.7.0; \ - PT_HPU_LAZY_MODE=1 python -m pytest tests/test_diffusers.py -v -s -k "test_train_text_to_image_" || status2=$$?; \ - PT_HPU_LAZY_MODE=1 python -m pytest tests/test_diffusers.py -v -s -k "test_train_controlnet" || status3=$$?; \ - PT_HPU_LAZY_MODE=1 python -m pytest tests/test_diffusers.py -v -s -k "test_deterministic_image_generation" || status4=$$?; \ - PT_HPU_LAZY_MODE=1 python -m pytest tests/test_diffusers.py -v -s -k "test_no_" || status5=$$?; \ - exit $$((status1 + status2 + status3 + status4 + status5)) + python -m pytest tests/test_diffusers.py -v -s slow_tests_sentence_transformers: test_installs python -m pytest tests/test_sentence_transformers.py -v -s diff --git a/optimum/habana/accelerate/accelerator.py b/optimum/habana/accelerate/accelerator.py index ea015b2fe8..6a9ac29db9 100644 --- a/optimum/habana/accelerate/accelerator.py +++ b/optimum/habana/accelerate/accelerator.py @@ -21,6 +21,7 @@ from dataclasses import make_dataclass from types import MethodType +import accelerate.utils.other import torch from accelerate import Accelerator from accelerate.accelerator import _split_batches @@ -378,7 +379,7 @@ def prepare_model(self, model: torch.nn.Module, device_placement: bool = None, e compile_kwargs = self.state.dynamo_plugin.to_kwargs() ############################################################################################################ if self.use_regional_compilation: - model = compile_regions(model, compile_kwargs) + model = compile_regions(model, **compile_kwargs) else: model = torch.compile(model, **compile_kwargs) ############################################################################################################ @@ -592,7 +593,7 @@ def _prepare_deepspeed(self, *args): compile_kwargs = self.state.dynamo_plugin.to_kwargs() ############################################################################################################### if self.use_regional_compilation: - compile_regions_deepspeed(engine.module, compile_kwargs) + compile_regions_deepspeed(engine.module, **compile_kwargs) else: engine.compile( backend=compile_kwargs.pop("backend"), diff --git a/tests/ci/slow_tests_1x.sh b/tests/ci/slow_tests_1x.sh index e5f23e93dc..444f5bb400 100644 --- a/tests/ci/slow_tests_1x.sh +++ b/tests/ci/slow_tests_1x.sh @@ -1,5 +1,6 @@ #!/bin/bash -python -m pip install --upgrade pip +python -m pip install --upgrade pip huggingface_hub export RUN_SLOW=true +huggingface-cli login --token $1 make slow_tests_1x