Skip to content

Commit

Permalink
more cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
arnavgarg1 committed Sep 16, 2022
1 parent 9756250 commit d798735
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions ludwig/hyperopt/execution.py
Original file line number Diff line number Diff line change
Expand Up @@ -942,13 +942,11 @@ def run_experiment_trial(config, local_hyperopt_dict, checkpoint_dir=None):
logger.warning("No trials reported results; check if time budget is lower than epoch latency.")
ordered_trials = []

# Remove temporary trials directory if it exists
print("Cleanup temporary remote directory if it exists")
# Remove temporary trials directory if it was created during syncing through RayTuneReportCallback
if has_remote_protocol(output_directory):
with use_credentials(backend.hyperopt_sync_manager.credentials):
tmp_remote_dir_path = os.path.join(backend.hyperopt_sync_manager.sync_dir, "tmp", experiment_name)
if path_exists(tmp_remote_dir_path):
print(f"{tmp_remote_dir_path} exists, deleting")
delete(tmp_remote_dir_path, recursive=True)

return HyperoptResults(ordered_trials=ordered_trials, experiment_analysis=analysis)
Expand Down

0 comments on commit d798735

Please sign in to comment.