Skip to content

Commit f353f8a

Browse files
authored
ODSC-48247/Update Doc On ModelDeployment Default Shape Name Selection (#376)
1 parent 1bc4b18 commit f353f8a

File tree

7 files changed

+26
-16
lines changed

7 files changed

+26
-16
lines changed

ads/model/artifact_uploader.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,8 +128,11 @@ class LargeArtifactUploader(ArtifactUploader):
128128
The OCI Object Storage URI where model artifacts will be copied to.
129129
The `bucket_uri` is only necessary for uploading large artifacts which
130130
size is greater than 2GB. Example: `oci://<bucket_name>@<namespace>/prefix/`.
131+
131132
.. versionadded:: 2.8.10
132-
If artifact_path is object storage path to a zip archive, bucket_uri will be ignored.
133+
134+
If artifact_path is object storage path to a zip archive, bucket_uri will be ignored.
135+
133136
dsc_model: OCIDataScienceModel
134137
The data scince model instance.
135138
overwrite_existing_artifact: bool
@@ -173,8 +176,11 @@ def __init__(
173176
The OCI Object Storage URI where model artifacts will be copied to.
174177
The `bucket_uri` is only necessary for uploading large artifacts from local which
175178
size is greater than 2GB. Example: `oci://<bucket_name>@<namespace>/prefix/`.
179+
176180
.. versionadded:: 2.8.10
177-
If `artifact_path` is object storage path to a zip archive, `bucket_uri` will be ignored.
181+
182+
If `artifact_path` is object storage path to a zip archive, `bucket_uri` will be ignored.
183+
178184
auth: (Dict, optional). Defaults to `None`.
179185
The default authetication is set using `ads.set_auth` API.
180186
If you need to override the default, use the `ads.common.auth.api_keys` or

ads/model/datascience_model.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -549,8 +549,11 @@ def create(self, **kwargs) -> "DataScienceModel":
549549
The OCI Object Storage URI where model artifacts will be copied to.
550550
The `bucket_uri` is only necessary for uploading large artifacts which
551551
size is greater than 2GB. Example: `oci://<bucket_name>@<namespace>/prefix/`.
552+
552553
.. versionadded:: 2.8.10
553-
If `artifact` is provided as an object storage path to a zip archive, `bucket_uri` will be ignored.
554+
555+
If `artifact` is provided as an object storage path to a zip archive, `bucket_uri` will be ignored.
556+
554557
overwrite_existing_artifact: (bool, optional). Defaults to `True`.
555558
Overwrite target bucket artifact if exists.
556559
remove_existing_artifact: (bool, optional). Defaults to `True`.
@@ -639,8 +642,11 @@ def upload_artifact(
639642
The OCI Object Storage URI where model artifacts will be copied to.
640643
The `bucket_uri` is only necessary for uploading large artifacts which
641644
size is greater than 2GB. Example: `oci://<bucket_name>@<namespace>/prefix/`.
645+
642646
.. versionadded:: 2.8.10
643-
If `artifact` is provided as an object storage path to a zip archive, `bucket_uri` will be ignored.
647+
648+
If `artifact` is provided as an object storage path to a zip archive, `bucket_uri` will be ignored.
649+
644650
auth: (Dict, optional). Defaults to `None`.
645651
The default authentication is set using `ads.set_auth` API.
646652
If you need to override the default, use the `ads.common.auth.api_keys` or

docs/source/user_guide/model_registration/_template/deploy.rst

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,11 @@ You can use the ``.deploy()`` method to deploy a model. You must first save the
77

88
The ``.deploy()`` method returns a ``ModelDeployment`` object. Specify deployment attributes such as display name, instance type, number of instances, maximum router bandwidth, and logging groups. The API takes the following parameters:
99

10-
See `API documentation <../../ads.model.html#id1>`__ for more details about the parameters.
11-
10+
See :py:meth:`~ads.model.GenericModel.deploy` for more details about the parameters.
1211

1312
.. admonition:: Tips
1413
:class: note
1514

1615
* Providing ``deployment_access_log_id`` and ``deployment_predict_log_id`` helps in debugging your model inference setup.
17-
* Default Load Balancer configuration has bandwidth of 10 Mbps. `Refer service document to help you choose the right setup. <https://docs.oracle.com/en-us/iaas/data-science/using/model_dep_create.htm>`_
18-
* Check for supported instance shapes `here <https://docs.oracle.com/en-us/iaas/data-science/using/overview.htm#supported-shapes>`_ .
16+
* Default Load Balancer configuration has bandwidth of 10 Mbps. `Refer service document to help you choose the right setup. <https://docs.oracle.com/en-us/iaas/data-science/using/model_dep_create.htm>`_
17+
* Check for supported instance shapes `here <https://docs.oracle.com/en-us/iaas/data-science/using/supported-shapes.htm>`_ .

docs/source/user_guide/model_registration/_template/prepare_save_deploy.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ The ``.prepare_save_deploy()`` method is a shortcut for the functions ``.prepare
2727
Namespace of region. Use this parameter to identify the service pack region
2828
when you pass a slug to ``inference_conda_env`` and ``training_conda_env``.
2929
* ``use_case_type``: str
30-
The use case type of the model. Assign a value using the``UseCaseType`` class or provide a string in ``UseCaseType``. For
30+
The use case type of the model. Assign a value using the ``UseCaseType`` class or provide a string in ``UseCaseType``. For
3131
example, use_case_type=UseCaseType.BINARY_CLASSIFICATION or use_case_type="binary_classification". Check
3232
the ``UseCaseType`` class to see supported types.
3333
* ``X_sample``: Union[list, tuple, pd.Series, np.ndarray, pd.DataFrame]. Defaults to None.
@@ -60,7 +60,7 @@ The ``.prepare_save_deploy()`` method is a shortcut for the functions ``.prepare
6060
The name of the model.
6161
* ``description``: (str, optional). Defaults to None.
6262
The description of the model.
63-
* ``deployment_instance_shape``: (str, optional). Default to ``VM.Standard2.1``.
63+
* ``deployment_instance_shape``: (str, optional).
6464
The shape of the instance used for deployment.
6565
* ``deployment_instance_count``: (int, optional). Defaults to 1.
6666
The number of instances used for deployment.

docs/source/user_guide/model_serialization/_template/prepare_save_deploy.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ The ``.prepare_save_deploy()`` method is a shortcut for the functions ``.prepare
2727
Namespace of region. Use this parameter to identify the service pack region
2828
when you pass a slug to ``inference_conda_env`` and ``training_conda_env``.
2929
* ``use_case_type``: str
30-
The use case type of the model. Assign a value using the``UseCaseType`` class or provide a string in ``UseCaseType``. For
30+
The use case type of the model. Assign a value using the ``UseCaseType`` class or provide a string in ``UseCaseType``. For
3131
example, use_case_type=UseCaseType.BINARY_CLASSIFICATION or use_case_type="binary_classification". Check
3232
the ``UseCaseType`` class to see supported types.
3333
* ``X_sample``: Union[list, tuple, pd.Series, np.ndarray, pd.DataFrame]. Defaults to None.
@@ -60,7 +60,7 @@ The ``.prepare_save_deploy()`` method is a shortcut for the functions ``.prepare
6060
The name of the model.
6161
* ``description``: (str, optional). Defaults to None.
6262
The description of the model.
63-
* ``deployment_instance_shape``: (str, optional). Default to ``VM.Standard2.1``.
63+
* ``deployment_instance_shape``: (str, optional).
6464
The shape of the instance used for deployment.
6565
* ``deployment_instance_count``: (int, optional). Defaults to 1.
6666
The number of instances used for deployment.
Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
You can use the ``.deploy()`` method to deploy a model. You must first save the model to the model catalog, and then deploy it.
1+
You can use the ``.deploy()`` method to deploy a model. You must first save the model to the model catalog, and then deploy it.
22

33
The ``.deploy()`` method returns a ``ModelDeployment`` object. Specify deployment attributes such as display name, instance type, number of instances, maximum router bandwidth, and logging groups. The API takes the following parameters:
44

55
- ``deployment_access_log_id: (str, optional)``: Defaults to ``None``. The access log OCID for the access logs, see `logging <https://docs.oracle.com/en-us/iaas/data-science/using/model_dep_using_logging.htm>`_.
66
- ``deployment_bandwidth_mbps: (int, optional)``: Defaults to 10. The bandwidth limit on the load balancer in Mbps.
77
- ``deployment_instance_count: (int, optional)``: Defaults to 1. The number of instances used for deployment.
8-
- ``deployment_instance_shape: (str, optional)``: Default to VM.Standard2.1. The shape of the instance used for deployment.
8+
- ``deployment_instance_shape: (str, optional)``: The shape of the instance used for deployment.
99
- ``deployment_log_group_id: (str, optional)``: Defaults to ``None``. The OCI logging group OCID. The access log and predict log share the same log group.
1010
- ``deployment_predict_log_id: (str, optional)``: Defaults to ``None``. The predict log OCID for the predict logs, see `logging <https://docs.oracle.com/en-us/iaas/data-science/using/model_dep_using_logging.htm>`_.
1111
- ``description: (str, optional)``: Defaults to ``None``. The description of the model.
@@ -16,4 +16,3 @@ The ``.deploy()`` method returns a ``ModelDeployment`` object. Specify deployme
1616
- ``max_wait_time : (int, optional)``: Defaults to 1200 seconds. The maximum amount of time to wait in seconds. A negative value implies an infinite wait time.
1717
- ``poll_interval : (int, optional)``: Defaults to 60 seconds. Poll interval in seconds.
1818
- ``project_id: (str, optional)``: Project OCID. If not specified, the value is taken from the environment variables.
19-

docs/source/user_guide/model_serialization/boilerplate/initialize.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ The ``properties`` is an instance of the ``ModelProperties`` class and has the f
1919
By default, ``properties`` is populated from the appropriate environment variables if it's
2020
not specified. For example, in a notebook session, the environment variables
2121
for project id and compartment id are preset and stored in ``PROJECT_OCID`` and
22-
``NB_SESSION_COMPARTMENT_OCID`` by default. So ``properties`` populates these variables
22+
``NB_SESSION_COMPARTMENT_OCID`` by default. So ``properties`` populates these variables
2323
from the environment variables and uses the values in methods such as ``.save()`` and ``.deploy()``.
2424
However, you can explicitly pass in values to overwrite the defaults.
2525
When you use a method that includes an instance of ``properties``, then ``properties`` records the values that you pass in.

0 commit comments

Comments
 (0)