Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Tune][Fix]Remove the clear_checkpoint function during Trial restoration error handling. #48532

Merged
Prev Previous commit
Next Next commit
fix faulty unit test of test_tune_restore
Signed-off-by: Hongpeng Guo <hpguo@anyscale.com>
  • Loading branch information
hongpeng-guo committed Nov 5, 2024
commit a40b92f47fd0ee1832564c9d67cf0afd6fe260c7
4 changes: 2 additions & 2 deletions python/ray/tune/tests/test_tuner_restore.py
Original file line number Diff line number Diff line change
Expand Up @@ -595,14 +595,14 @@ def load_checkpoint(self, checkpoint_dir):
failure_config=FailureConfig(max_failures=1),
checkpoint_config=CheckpointConfig(checkpoint_frequency=1),
),
param_space={"tag_file_path": tag_file},
param_space={"tag_file_path": tag_file, "retry_num_to_fail": retry_num},
)
results = tuner.fit()
[result] = list(results)
if retry_num > 0:
assert result.metrics["score"] == 5
else:
assert result.metrics["score"] == 2
assert result.metrics["score"] == 5


def test_restore_overwrite_trainable(ray_start_2_cpus, tmpdir):
Expand Down