From de88f1e6b3864e554b595c2e4fd6f03eb79ff78a Mon Sep 17 00:00:00 2001 From: Cengguang Zhang Date: Tue, 13 Dec 2022 14:31:15 +0800 Subject: [PATCH] doc: add load to pytorch estimator quickstart. (#6920) * doc: add load to pytorch estimator quickstart. * fix: fix style. * fix typo * fix wording. --- .../Orca/QuickStart/orca-pytorch-quickstart.md | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/docs/readthedocs/source/doc/Orca/QuickStart/orca-pytorch-quickstart.md b/docs/readthedocs/source/doc/Orca/QuickStart/orca-pytorch-quickstart.md index bb702490..c6a62d1e 100644 --- a/docs/readthedocs/source/doc/Orca/QuickStart/orca-pytorch-quickstart.md +++ b/docs/readthedocs/source/doc/Orca/QuickStart/orca-pytorch-quickstart.md @@ -127,15 +127,22 @@ for r in result: print(r, ":", result[r]) ``` -### Step 5: Save the Model - -Save the Estimator states (including model and optimizer) to the provided model path. +### Step 5: Save and Load the Model +Save the Estimator states (including the model and optimizer) to the provided model path. ```python est.save("mnist_model") +``` -# stop orca context when program finishes -stop_orca_context() +Save the entire model to the provided model path. +```python +est.save("mnist_model", entire=True) +``` + +Load the Estimator states (including the model and optimizer) or the entire model from the provided model path. + +```python +est.load("mnist_model") ``` **Note:** You should call `stop_orca_context()` when your application finishes.