Skip to content

Commit

Permalink
Add remote checkpoint support to ray tune post search evaluation (#1646)
Browse files Browse the repository at this point in the history
Co-authored-by: Anne Holler <anne@vmware.com>
  • Loading branch information
amholler and anneholler committed Jan 5, 2022
1 parent 5192a2a commit 9bf0272
Showing 1 changed file with 5 additions and 0 deletions.
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

0 comments on commit 9bf0272

Please sign in to comment.