Skip to content

Commit

Permalink
Orca tf save_keras_model add overwrite option (intel-analytics#2835)
Browse files Browse the repository at this point in the history
* orca tf save_keras_model add overwrite option

* add default value & update docs

* fix
  • Loading branch information
cyita authored and yangw1234 committed Sep 26, 2021
1 parent c229faa commit ed22cb9
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions python/orca/src/bigdl/orca/learn/tf/estimator.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,10 +183,11 @@ def save_tf_checkpoint(self, path):
"""
raise NotImplementedError()

def save_keras_model(self, path):
def save_keras_model(self, path, overwrite=True):
"""
Save tensorflow keras model in this estimator.
:param path: keras model save path.
:param overwrite: Whether to silently overwrite any existing file at the target location.
"""
raise NotImplementedError()

Expand Down Expand Up @@ -576,5 +577,5 @@ def evaluate(self, data, batch_size=4,

return self.model.evaluate(dataset, batch_per_thread=batch_size)

def save_keras_model(self, path):
self.model.save_model(path)
def save_keras_model(self, path, overwrite=True):
self.model.save_model(path, overwrite=overwrite)

0 comments on commit ed22cb9

Please sign in to comment.