Skip to content

Commit

Permalink
Switch default save format to TF to avoid warnings in most cases. Pic…
Browse files Browse the repository at this point in the history
…kling an ivis model will still issue a warning, but it still works correctly.
  • Loading branch information
Szubie committed Jun 12, 2024
1 parent bf13075 commit ae0e96d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions ivis/ivis.py
Original file line number Diff line number Diff line change
Expand Up @@ -419,16 +419,16 @@ def score_samples(self, X):
supervised_output = self.supervised_model_.predict(gen, verbose=self.verbose)
return supervised_output

def save_model(self, folder_path, save_format='h5', overwrite=False):
def save_model(self, folder_path, save_format='tf', overwrite=False):
"""Save an ivis model
Parameters
----------
folder_path : string
Path to serialised model files and metadata
save_format: string
Format to save ivis model as. Either ".h5" for a .h5 file or
"tf" for TensorFlow SavedModel format.
Format to save ivis model as. Either "tf" for TensorFlow SavedModel format
or "h5" for a .h5 file. Default is "tf".
overwrite : bool
Whether to overwrite the specified folder path.
"""
Expand Down
2 changes: 1 addition & 1 deletion tests/test_model_saving.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ def _supervised_custom_model_saving(model_filepath, save_fn, load_fn):
y_pred_2 = model_2.fit_transform(X, Y)

### Save and load ###
def _save_ivis_model(model, filepath, save_format='h5'):
def _save_ivis_model(model, filepath, save_format='tf'):
model.save_model(filepath, save_format=save_format, overwrite=True)

def _load_ivis_model(filepath):
Expand Down

0 comments on commit ae0e96d

Please sign in to comment.