Skip to content

Commit

Permalink
fix: Format issues resolved
Browse files Browse the repository at this point in the history
Signed-off-by: Padmanabha V Seshadri <[email protected]>
  • Loading branch information
seshapad committed Jul 30, 2024
1 parent 69db9d1 commit ad48193
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
4 changes: 1 addition & 3 deletions tests/data/trainercontroller/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,4 @@
TRAINER_CONFIG_TEST_THRESHOLDED_TRAINING_LOSS_YAML = os.path.join(
_DATA_DIR, "thresholded-training-loss.yaml"
)
TRAINER_CONFIG_TEST_ON_SAVE_YAML = os.path.join(
_DATA_DIR, "on-save.yaml"
)
TRAINER_CONFIG_TEST_ON_SAVE_YAML = os.path.join(_DATA_DIR, "on-save.yaml")
5 changes: 2 additions & 3 deletions tests/trainercontroller/test_tuning_trainercontroller.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,14 +137,13 @@ def test_thresholded_training_loss():
tc_callback.on_log(args=test_data.args, state=test_data.states[2], control=control)
assert control.should_training_stop is True


def test_thresholded_training_loss_on_save():
"""Tests the thresholded training loss example in
`examples/trainer-controller-configs/on-save.yaml`
"""
test_data = _setup_data()
tc_callback = tc.TrainerControllerCallback(
td.TRAINER_CONFIG_TEST_ON_SAVE_YAML
)
tc_callback = tc.TrainerControllerCallback(td.TRAINER_CONFIG_TEST_ON_SAVE_YAML)
control = TrainerControl(should_training_stop=False)
# Trigger on_init_end to perform registration of handlers to events
tc_callback.on_init_end(
Expand Down

0 comments on commit ad48193

Please sign in to comment.