Skip to content

Commit

Permalink
Update test_validation.py
Browse files Browse the repository at this point in the history
  • Loading branch information
JohanWork committed Apr 3, 2024
1 parent 6a634e2 commit 595ea1d
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions tests/test_validation.py
Original file line number Diff line number Diff line change
Expand Up @@ -1060,7 +1060,9 @@ def test_hub_model_id_save_value_warns_save_stragey_no(self, minimal_cfg):
)

def test_hub_model_id_save_value_warns_random_value(self, minimal_cfg):
cfg = DictDefault({"hub_model_id": "test", "save_strategy": "test"}) | minimal_cfg
cfg = (
DictDefault({"hub_model_id": "test", "save_strategy": "test"}) | minimal_cfg
)

with self._caplog.at_level(logging.WARNING):
validate_config(cfg)
Expand All @@ -1069,14 +1071,20 @@ def test_hub_model_id_save_value_warns_random_value(self, minimal_cfg):
)

def test_hub_model_id_save_value_steps(self, minimal_cfg):
cfg = DictDefault({"hub_model_id": "test", "save_strategy": "steps"}) | minimal_cfg
cfg = (
DictDefault({"hub_model_id": "test", "save_strategy": "steps"})
| minimal_cfg
)

with self._caplog.at_level(logging.WARNING):
validate_config(cfg)
assert len(self._caplog.records) == 0

def test_hub_model_id_save_value_epochs(self, minimal_cfg):
cfg = DictDefault({"hub_model_id": "test", "save_strategy": "epoch"}) | minimal_cfg
cfg = (
DictDefault({"hub_model_id": "test", "save_strategy": "epoch"})
| minimal_cfg
)

with self._caplog.at_level(logging.WARNING):
validate_config(cfg)
Expand Down

0 comments on commit 595ea1d

Please sign in to comment.