Skip to content

Commit

Permalink
bugfixed is_lazy
Browse files Browse the repository at this point in the history
  • Loading branch information
miquelduranfrigola committed Nov 19, 2022
1 parent e5ed5c6 commit a194115
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 0 additions & 1 deletion zairachem/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,6 @@ def is_lazy(self):
model_dir = self.get_trained_dir()
with open(os.path.join(output_dir, DATA_SUBFOLDER, PRESETS_FILENAME), "r") as f:
data = json.load(f)
print(data)
if data["is_lazy"]:
return True
with open(os.path.join(model_dir, DATA_SUBFOLDER, PRESETS_FILENAME), "r") as f:
Expand Down
4 changes: 4 additions & 0 deletions zairachem/setup/training.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
from ..vars import APPLICABILITY_SUBFOLDER
from ..vars import REPORT_SUBFOLDER
from ..vars import OUTPUT_FILENAME
from ..vars import PRESETS_FILENAME

from ..tools.melloddy.pipeline import MelloddyTunerTrainPipeline
from ..augmentation.augment import Augmenter
Expand Down Expand Up @@ -78,6 +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:
data = {"is_lazy": self._is_lazy}
json.dump(data, f, indent=4)
return self._is_lazy

def _copy_input_file(self):
Expand Down

0 comments on commit a194115

Please sign in to comment.