skip Glm4MoeModelTest::test_torch_compile_for_training (#39670)
* fix * fix * fix --------- Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
This commit is contained in:
@@ -79,8 +79,8 @@ class Glm4MoeModelTest(CausalLMModelTest, unittest.TestCase):
|
|||||||
test_pruning = False
|
test_pruning = False
|
||||||
fx_compatible = False
|
fx_compatible = False
|
||||||
model_tester_class = Glm4MoeModelTester
|
model_tester_class = Glm4MoeModelTester
|
||||||
# used in `test_torch_compile_for_training`
|
# used in `test_torch_compile_for_training`. Skip as "Dynamic control flow in MoE"
|
||||||
_torch_compile_train_cls = Glm4MoeForCausalLM if is_torch_available() else None
|
_torch_compile_train_cls = None
|
||||||
|
|
||||||
|
|
||||||
@require_torch_accelerator
|
@require_torch_accelerator
|
||||||
|
|||||||
@@ -4476,7 +4476,7 @@ class ModelTesterMixin:
|
|||||||
if version.parse(torch.__version__) < version.parse("2.3"):
|
if version.parse(torch.__version__) < version.parse("2.3"):
|
||||||
self.skipTest(reason="This test requires torch >= 2.3 to run.")
|
self.skipTest(reason="This test requires torch >= 2.3 to run.")
|
||||||
|
|
||||||
if not hasattr(self, "_torch_compile_train_cls"):
|
if getattr(self, "_torch_compile_train_cls", None) is None:
|
||||||
self.skipTest(f"{self.__class__.__name__} doesn't have the attribute `_torch_compile_train_cls`.")
|
self.skipTest(f"{self.__class__.__name__} doesn't have the attribute `_torch_compile_train_cls`.")
|
||||||
|
|
||||||
config, _ = self.model_tester.prepare_config_and_inputs_for_common()
|
config, _ = self.model_tester.prepare_config_and_inputs_for_common()
|
||||||
|
|||||||
Reference in New Issue
Block a user