This is an automated email from the ASF dual-hosted git repository.

pingsutw pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/submarine.git


The following commit(s) were added to refs/heads/master by this push:
     new 690bb72c SUBMARINE-1263. SubmarineClient document
690bb72c is described below

commit 690bb72c83199c7a25b331441f2928a52299e1a7
Author: jeff-901 <[email protected]>
AuthorDate: Wed Apr 27 21:05:06 2022 +0800

    SUBMARINE-1263. SubmarineClient document
    
    ### What is this PR for?
    Add python sdk `SubmarineClient` document
    
    ### What type of PR is it?
    Documentation
    
    ### Todos
    
    ### What is the Jira issue?
    https://issues.apache.org/jira/browse/SUBMARINE-1263
    
    ### How should this be tested?
    
    ### Screenshots (if appropriate)
    
    ### Questions:
    * Do the license files need updating? No
    * Are there breaking changes for older versions? No
    * Does this need new documentation? No
    
    Author: jeff-901 <[email protected]>
    
    Signed-off-by: Kevin <[email protected]>
    
    Closes #947 from jeff-901/SUBMARINE-1263 and squashes the following commits:
    
    3c1a99f6 [jeff-901] add doc
---
 .../pysubmarine/submarine/tracking/client.py       |  1 -
 .../userDocs/submarine-sdk/submarine-client.md     | 78 ++++++++++++++++++++++
 website/docs/userDocs/submarine-sdk/tracking.md    |  6 +-
 website/sidebars.js                                |  1 +
 4 files changed, 81 insertions(+), 5 deletions(-)

diff --git a/submarine-sdk/pysubmarine/submarine/tracking/client.py 
b/submarine-sdk/pysubmarine/submarine/tracking/client.py
index 3199632f..49d379d8 100644
--- a/submarine-sdk/pysubmarine/submarine/tracking/client.py
+++ b/submarine-sdk/pysubmarine/submarine/tracking/client.py
@@ -163,7 +163,6 @@ class SubmarineClient(object):
         model_id: str,
         input_dim: list = None,
         output_dim: list = None,
-        registered: bool = False,
     ):
         """
         Save a model into the minio pod.
diff --git a/website/docs/userDocs/submarine-sdk/submarine-client.md 
b/website/docs/userDocs/submarine-sdk/submarine-client.md
new file mode 100644
index 00000000..3fcac37e
--- /dev/null
+++ b/website/docs/userDocs/submarine-sdk/submarine-client.md
@@ -0,0 +1,78 @@
+---
+title: Submarine Client
+---
+
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+## class SubmarineClient()
+
+Client of submarine to log metric/param, save model and create/delete serve.
+
+### `log_metric(job_id: str, key: str, value: float, worker_index: str, 
timestamp: datetime = None, step: int = None) -> None`
+
+Log a single key-value metric with job id and worker index. The value must 
always be a number.
+
+> **Parameters**
+  - **job_id**: The job name to which the metric should be logged.
+  - **key** - Metric name.
+  - **value** - Metric value.
+  - **worker_index** - Metric worker_index.
+  - **timestamp** - Time when this metric was calculated. Defaults to the 
current system time.
+  - **step** - A single integer step at which to log the specified Metrics, by 
default it's 0.
+
+### `log_param(job_id: str, key: str, value: str, worker_index: str) -> None`
+
+Log a single key-value parameter with job id and worker index. The key and 
value are both strings.
+
+> **Parameters**
+  - **job_id** - The job name to which the parameter should be logged.
+  - **key** - Parameter name.
+  - **value** - Parameter value.
+  - **worker_index** - Parameter worker_index.
+
+
+### `save_model(model, model_type: str, registered_model_name: str = None, 
input_dim: list = None, output_dim: list = None) -> None`
+
+Save a model into the minio pod.
+
+> **Parameters**
+  - **model** - Model artifact.
+  - **model_type** - The type of model. Only support `pytorch` and 
`tensorflow`.
+  - **registered_model_name** - If it is not `None`, the model will be 
registered into the model registry with this name.
+  - **input_dim** - The input dimension of the model.
+  - **output_dim** - The output dimension of the model.
+
+### `create_serve(self, model_name: str, model_version: int, async_req: bool = 
True)`
+
+Create serve of a model through Seldon Core.
+
+> **Parameters**
+  - **model_name** - Name of a registered model
+  - **model_version**: Version of a registered model
+  - **async_req** - Execute request asynchronously
+
+### `delete_serve(self, model_name: str, model_version: int, async_req: bool = 
True)`
+
+Delete a serving model.
+
+> **Parameters**
+  - **model_name** - Name of a registered model
+  - **model_version**: Version of a registered model
+  - **async_req** - Execute request asynchronously
diff --git a/website/docs/userDocs/submarine-sdk/tracking.md 
b/website/docs/userDocs/submarine-sdk/tracking.md
index 861c3941..d7408b85 100644
--- a/website/docs/userDocs/submarine-sdk/tracking.md
+++ b/website/docs/userDocs/submarine-sdk/tracking.md
@@ -56,7 +56,6 @@ log a single key-value parameter. The key and value are both 
strings.
   - **value** - Parameter value.
 
 ### `submarine.log_metric(key: str, value: float, step=0) -> None`
-
 log a single key-value metric. The value must always be a number.
 
 > **Parameters**
@@ -64,14 +63,13 @@ log a single key-value metric. The value must always be a 
number.
   - **value** - Metric value.
   - **step** - A single integer step at which to log the specified Metrics, by 
default it's 0.
 
-### `submarine.save_model(model_type: str, model, artifact_path: str, 
registered_model_name: str = None, input_dim: list = None, output_dim: list = 
None,) -> None`
+### `submarine.save_model(model_type: str, model, registered_model_name: str = 
None, input_dim: list = None, output_dim: list = None,) -> None`
 
- Save a model into the minio pod.
+ sSave a model into the minio pod.
 
 > **Parameters**
   - **model_type** - The type of model. Only support `pytorch` and 
`tensorflow`.
   - **model** - Model artifact.
-  - **artifact_path** - Model name.
   - **registered_model_name** - If it is not `None`, the model will be 
registered into the model registry with this name.
   - **input_dim** - The input dimension of the model.
   - **output_dim** - The output dimension of the model.
diff --git a/website/sidebars.js b/website/sidebars.js
index 79d5cfc3..de8182bd 100644
--- a/website/sidebars.js
+++ b/website/sidebars.js
@@ -32,6 +32,7 @@ module.exports = {
                         "userDocs/submarine-sdk/experiment-client",
                         "userDocs/submarine-sdk/submarine-cli",
                         "userDocs/submarine-sdk/tracking",
+                        "userDocs/submarine-sdk/submarine-client",
                     ],
                 },
                 {


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to