Skip to content

Commit ae0e96d

Browse files
committed
Switch default save format to TF to avoid warnings in most cases. Pickling an ivis model will still issue a warning, but it still works correctly.
1 parent bf13075 commit ae0e96d

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

ivis/ivis.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -419,16 +419,16 @@ def score_samples(self, X):
419419
supervised_output = self.supervised_model_.predict(gen, verbose=self.verbose)
420420
return supervised_output
421421

422-
def save_model(self, folder_path, save_format='h5', overwrite=False):
422+
def save_model(self, folder_path, save_format='tf', overwrite=False):
423423
"""Save an ivis model
424424
425425
Parameters
426426
----------
427427
folder_path : string
428428
Path to serialised model files and metadata
429429
save_format: string
430-
Format to save ivis model as. Either ".h5" for a .h5 file or
431-
"tf" for TensorFlow SavedModel format.
430+
Format to save ivis model as. Either "tf" for TensorFlow SavedModel format
431+
or "h5" for a .h5 file. Default is "tf".
432432
overwrite : bool
433433
Whether to overwrite the specified folder path.
434434
"""

tests/test_model_saving.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ def _supervised_custom_model_saving(model_filepath, save_fn, load_fn):
130130
y_pred_2 = model_2.fit_transform(X, Y)
131131

132132
### Save and load ###
133-
def _save_ivis_model(model, filepath, save_format='h5'):
133+
def _save_ivis_model(model, filepath, save_format='tf'):
134134
model.save_model(filepath, save_format=save_format, overwrite=True)
135135

136136
def _load_ivis_model(filepath):

0 commit comments

Comments
 (0)