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

Add remote checkpoint support to ray tune post search evaluation #1646

Merged
merged 1 commit into from
Jan 5, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions ludwig/hyperopt/execution.py
Original file line number Diff line number Diff line change
Expand Up @@ -1171,6 +1171,11 @@ def run_experiment_trial(config, local_hyperopt_dict, checkpoint_dir=None):
# Evaluate the best model on the eval_split, which is validation_set
if validation_set is not None and validation_set.size > 0:
trial_path = trial['trial_dir']
sync_info = self._get_sync_client_and_remote_checkpoint_dir(Path(trial_path))
if sync_info is not None:
sync_client, remote_checkpoint_dir = sync_info
sync_client.sync_down(remote_checkpoint_dir, trial_path)
sync_client.wait()
self._remove_partial_checkpoints(trial_path) # needed by get_best_checkpoint
best_model_path = analysis.get_best_checkpoint(trial_path.rstrip('/'))
best_model = LudwigModel.load(
Expand Down