Skip to content

Commit

Permalink
add test case
Browse files Browse the repository at this point in the history
  • Loading branch information
winglian authored and NanoCode012 committed Nov 5, 2024
1 parent 1ed3517 commit 1b8d439
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions tests/integrations/liger.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,3 +63,18 @@ def test_deprecated_swiglu(self, minimal_cfg):
)
assert updated_cfg.liger_swiglu is None
assert updated_cfg.liger_glu_activations is False

def test_conflict_swiglu_ligergluactivation(self, minimal_cfg):
test_cfg = DictDefault(
{
"liger_swiglu": False,
"liger_glu_activations": True,
}
| minimal_cfg
)

with pytest.raises(
ValueError,
match=r".*You cannot have both `liger_swiglu` and `liger_glu_activation` set.*",
):
validate_config(test_cfg)

0 comments on commit 1b8d439

Please sign in to comment.