Skip to content

Commit

Permalink
Fix trajectory file output
Browse files Browse the repository at this point in the history
  • Loading branch information
franchuterivera committed Mar 8, 2021
1 parent 5d63668 commit c95fbf3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions autoPyTorch/api/base_task.py
Original file line number Diff line number Diff line change
Expand Up @@ -858,11 +858,11 @@ def _search(
saveable_trajectory = \
[list(entry[:2]) + [entry[2].get_dictionary()] + list(entry[3:])
for entry in self.trajectory]
if os.path.exists(trajectory_filename):
try:
with open(trajectory_filename, 'w') as fh:
json.dump(saveable_trajectory, fh)
else:
self._logger.warning(f"File {trajectory_filename} does not exists...")
except Exception as e:
self._logger.warning(f"Cannot save {trajectory_filename} due to {e}...")
except Exception as e:
self._logger.exception(str(e))
raise
Expand Down

0 comments on commit c95fbf3

Please sign in to comment.