Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename APIs for model serving framework #159

Merged
merged 13 commits into from
May 31, 2023
2 changes: 1 addition & 1 deletion .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
cluster: ["opensearch"]
secured: ["true"]
entry:
- { opensearch_version: 2.6.0 }
- { opensearch_version: 2.7.0 }

steps:
- name: Checkout
Expand Down
6 changes: 6 additions & 0 deletions docs/source/reference/api/ml_commons_deploy_api.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Deploy Model
==================

.. currentmodule:: opensearch_py_ml

.. autofunction:: opensearch_py_ml.ml_commons.MLCommonClient.deploy_model
6 changes: 6 additions & 0 deletions docs/source/reference/api/ml_commons_register_api.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Register Model
==================

.. currentmodule:: opensearch_py_ml

.. autofunction:: opensearch_py_ml.ml_commons.MLCommonClient.register_model
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Register Pretrained Model
==================
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to cover ====== all the way to Model.


.. currentmodule:: opensearch_py_ml

.. autofunction:: opensearch_py_ml.ml_commons.MLCommonClient.register_pretrained_model
6 changes: 6 additions & 0 deletions docs/source/reference/api/ml_commons_undeploy_model_api.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Undeploy Model
==================

.. currentmodule:: opensearch_py_ml

.. autofunction:: opensearch_py_ml.ml_commons.MLCommonClient.undeploy_model
28 changes: 28 additions & 0 deletions docs/source/reference/mlcommons.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,41 @@ Upload Model

api/ml_commons_upload_api

Register Model
~~~~~~~~~~~~~~
.. toctree::
:maxdepth: 2

api/ml_commons_register_api

Upload Pretrained Model
~~~~~~~~~~~~~~~~~~~~~~~
.. toctree::
:maxdepth: 2

api/ml_commons_upload_pretrained_api

Register Pretrained Model
~~~~~~~~~~~~~~~~~~~~~~~~~
.. toctree::
:maxdepth: 2

api/ml_commons_register_pretrained_api

Load Model
~~~~~~~~~~
.. toctree::
:maxdepth: 2

api/ml_commons_load_api

Deploy Model
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here.

~~~~~~~~~~
.. toctree::
:maxdepth: 2

api/ml_commons_deploy_api

Get Task Info
~~~~~~~~~~~~~
.. toctree::
Expand Down Expand Up @@ -54,6 +75,13 @@ Unload Model

api/ml_commons_unload_model_api

Undeploy Model
~~~~~~~~~~~~
.. toctree::
:maxdepth: 2

api/ml_commons_undeploy_model_api

Delete Model
~~~~~~~~~~~~
.. toctree::
Expand Down
2 changes: 1 addition & 1 deletion opensearch_py_ml/ml_commons/ml_common_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# GitHub history for details.

ML_BASE_URI = "/_plugins/_ml"
MODEL_UPLOAD_CHUNK_SIZE = 10_000_000
MODEL_REGISTER_CHUNK_SIZE = 10_000_000
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about change to MODEL_CHUNK_SIZE_LIMIT

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or to match the MODEL_MAX_SIZE, another option is MODEL_CHUNK_MAX_SIZE ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

MODEL_MAX_SIZE = 4_000_000_000
BUF_SIZE = 65536 # lets read stuff in 64kb chunks!
TIMEOUT = 120 # timeout for synchronous method calls in seconds
Loading