Skip to content

Commit e229ed1

Browse files
committed
stricter check.
1 parent e2c7d17 commit e229ed1

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

tests/models/test_modeling_common.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1936,6 +1936,9 @@ def test_torch_compile_recompilation_and_graph_break(self):
19361936
_ = model(**inputs_dict)
19371937

19381938
def test_torch_compile_repeated_blocks(self):
1939+
if self.model_class._repeated_blocks is None:
1940+
pytest.skip("Skipping test as `_repeated_blocks` is not set in the model class.")
1941+
19391942
init_dict, inputs_dict = self.prepare_init_args_and_inputs_for_common()
19401943

19411944
model = self.model_class(**init_dict).to(torch_device)

0 commit comments

Comments
 (0)