Skip to content

Commit a20d03d

Browse files
committed
pytest.xfail -> ValueError.
1 parent ea14465 commit a20d03d

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

tests/lora/utils.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1603,9 +1603,10 @@ def test_lora_fuse_nan(self):
16031603
tower_name for tower_name in possible_tower_names if hasattr(pipe.transformer, tower_name)
16041604
]
16051605
if len(filtered_tower_names) == 0:
1606-
pytest.xfail(
1607-
reason=f"`pipe.transformer` didn't have any of the following attributes: {possible_tower_names}."
1606+
reason = (
1607+
f"`pipe.transformer` didn't have any of the following attributes: {possible_tower_names}."
16081608
)
1609+
raise ValueError(reason)
16091610
for tower_name in filtered_tower_names:
16101611
transformer_tower = getattr(pipe.transformer, tower_name)
16111612
has_attn1 = any("attn1" in name for name in named_modules)

0 commit comments

Comments
 (0)