Skip to content

Commit

Permalink
Orca TF Estimator Documentation (intel-analytics#2710)
Browse files Browse the repository at this point in the history
* init orca tf estimator docs

* move orca tf estimator doc

* update estimtor api
  • Loading branch information
jenniew authored and yangw1234 committed Sep 26, 2021
1 parent 7a45764 commit a450bb4
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions python/orca/src/bigdl/orca/learn/tf/estimator.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,22 @@ def evaluate(self, data, **kwargs):
pass

def load_orca_checkpoint(self, path, version):
"""
Load specified Orca checkpoint.
:param path: checkpoint directory which contains model.* and
optimMethod-TFParkTraining.* files.
:param version: checkpoint version, which is the suffix of model.* file,
i.e., for modle.4 file, the version is 4.
"""
self.load_checkpoint = True
self.checkpoint_path = path
self.checkpoint_version = version

def load_latest_orca_checkpoint(self, path):
"""
Load latest Orca checkpoint under specified directory.
:param path: directory containing Orca checkpoint files.
"""
ckpt_path, version = find_latest_checkpoint(path)
if ckpt_path is None:
raise Exception("Cannot find checkpoint")
Expand All @@ -64,8 +75,7 @@ def set_tensorboard(self, log_dir, app_name):
def get_train_summary(self, tag=None):
"""
Get the scalar from model train summary
Return 2-D array like object which could be converted
by nd.array()
Return list of summary data of [iteration_number, scalar_value, timestamp]
# Arguments
tag: The string variable represents the scalar wanted
"""
Expand All @@ -77,8 +87,7 @@ def get_train_summary(self, tag=None):
def get_validation_summary(self, tag=None):
"""
Get the scalar from model validation summary
Return 2-D array like object which could be converted
by np.array()
Return list of summary data of [iteration_number, scalar_value, timestamp]
Note: The metric and tag may not be consistent
Please look up following form to pass tag parameter
Expand Down

0 comments on commit a450bb4

Please sign in to comment.