Skip to content

Commit

Permalink
minor bugfix in test KerasSequenceCNN
Browse files Browse the repository at this point in the history
  • Loading branch information
LonnekeScheffer committed Apr 18, 2024
1 parent 1a1d8c4 commit 1bea581
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion immuneML/ml_methods/BinaryFeatureClassifier.py
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ def store(self, path: Path, feature_names=None, details_path: Path = None):
del custom_vars["result_path"]

if self.label:
custom_vars["label"] = {key.lstrip("_"): value for key, value in vars(self.label).items()}
custom_vars["label"] = self.label.get_desc_for_storage()

params_path = path / "custom_params.yaml"
with params_path.open('w') as file:
Expand Down
4 changes: 2 additions & 2 deletions immuneML/ml_methods/KerasSequenceCNN.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ def fit_by_cross_validation(self, encoded_data: EncodedData, label: Label = None
def store(self, path: Path, feature_names=None, details_path: Path = None):
PathBuilder.build(path)

self.model.save(path / "model")
self.model.save(path / "model.keras")

custom_vars = copy.deepcopy(vars(self))
del custom_vars["model"]
Expand Down Expand Up @@ -228,7 +228,7 @@ def load(self, path):
else:
setattr(self, param, value)

self.model = keras.models.load_model(path / "model")
self.model = keras.models.load_model(path / "model.keras")

def check_if_exists(self, path):
return self.model is not None
Expand Down

0 comments on commit 1bea581

Please sign in to comment.