Skip to content

Commit

Permalink
skip data augmentation if not done before
Browse files Browse the repository at this point in the history
  • Loading branch information
miquelduranfrigola committed Nov 19, 2022
1 parent a194115 commit dc29c22
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 4 additions & 1 deletion zairachem/estimators/from_molmap/estimate.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,10 @@ def __init__(self, path):
self.get_output_dir(), ESTIMATORS_SUBFOLDER, ESTIMATORS_FAMILY_SUBFOLDER
)
if _USE_AUGMENTED:
self._data_filename = DATA_AUGMENTED_FILENAME
if os.path.exists(self.path, DATA_SUBFOLDER, DATA_AUGMENTED_FILENAME):
self._data_filename = DATA_AUGMENTED_FILENAME
else:
self._data_filename = DATA_FILENAME
else:
self._data_filename = DATA_FILENAME

Expand Down
4 changes: 3 additions & 1 deletion zairachem/setup/training.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,9 @@ def __init__(
self.time_budget = time_budget # TODO

def is_lazy(self):
with open(os.path.join(self.output_dir, DATA_SUBFOLDER, PRESETS_FILENAME), "w") as f:
with open(
os.path.join(self.output_dir, DATA_SUBFOLDER, PRESETS_FILENAME), "w"
) as f:
data = {"is_lazy": self._is_lazy}
json.dump(data, f, indent=4)
return self._is_lazy
Expand Down

0 comments on commit dc29c22

Please sign in to comment.