-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
addtions to enhance documentation to add general model registry secti…
…ons then also details on deployment Signed-off-by: Ramesh Reddy <[email protected]>
- Loading branch information
Showing
25 changed files
with
818 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# Model Registry | ||
|
||
A model registry is an important component in the lifecycle of AI/ML models, an integral component for any MLOps platform and for ML workflows, serving as the central repository holding metadata pertaining to machine learning models from inception to deployment. This encompasses both high-level details like deployment environment and project origins, as well as intricate information like training hyperparameters, performance metrics, and deployment events. Acting as a bridge between model experimentation and serving, it offers a secure, collaborative interface of a metadata store for stakeholders involved in the ML lifecycle. | ||
|
||
![Model Registry](./images/model-registry.png) | ||
|
||
|
||
The below are links more documention on Model Registry | ||
|
||
1. [Introduction](./introduction.md) | ||
2. [Install Model Registry](./install.md) | ||
3. [How to use Model Registry Python library](./getting-started.md) | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# Deploy Model Using Dashboard | ||
|
||
Once the model is designed and uploaded to a S3 bucket and "registered" in the Model Registry, user can choose to deploy the model for inferencing. | ||
|
||
It is expected that you have access to Open Datahub Dashboard. Using the Dashboard, create or use existing "Data Science Project" | ||
|
||
![Model Registry](./images/dashboard-home.png) | ||
|
||
Now click on leftnav item "Model Registry", click the model, which will switch to displaying all the model versions under that model name. You can click the kebab menu next to model version and select "deploy" or client on version and then select the "actions" menu to get to the "deploy" | ||
|
||
![Model Registry](./images/dashboard-modelregistry-model.png) | ||
|
||
Which pops this window | ||
|
||
![Model Registry](./images/dashboard-modelregistry-deploy1.png) | ||
|
||
Select the target "project" you want to deploy this model into from the drop down box. Note that Model Registry is not scoped to a single porject, it can scoped to whole cluster, or to more than one project. So it is required that user choose the project where they want to deploy into. Which will bring to this page | ||
|
||
![Model Registry](./images/dashboard-modelregistry-deploy2.png) | ||
|
||
On this dialog box please select | ||
* Serving Runtime: Model Runtime server you want to use to run your model | ||
* Model Framework: Select the model framework that model is designed from dropdown list. | ||
* Data Connection: This is one key property user must provide. Since Model Registry only contains metadata information not actual physical model, user need to provide credentails to access the model on S3 bucket. Here if "data connection" is aleady available in the project you can select to reuse, if not user has option to provide the credentils to the S3 bucket to reach to the model. | ||
|
||
Once you make all the other selections, click deploy. This should show the "Deployments" tab and status of the deployment. | ||
|
||
![Model Registry](./images/dashboard-modelregistry-deploy3.png) | ||
|
||
You can click on the "inference service" link in the middle of the screen to get to the Inference endpoint that you can use to connect from your application for predictions. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import requests | ||
import boto3 | ||
from botocore.exceptions import NoCredentialsError | ||
|
||
def download_file(url, local_filename): | ||
""" | ||
Downloads a file from the given URL and saves it locally. | ||
:param url: The URL of the file to download | ||
:param local_filename: The path to save the file locally | ||
:return: The local file path | ||
""" | ||
response = requests.get(url, stream=True) | ||
if response.status_code == 200: | ||
with open(local_filename, 'wb') as f: | ||
for chunk in response.iter_content(1024): | ||
f.write(chunk) | ||
print(f"File downloaded successfully: {local_filename}") | ||
return local_filename | ||
else: | ||
raise Exception(f"Failed to download file: Status code {response.status_code}") | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# Model Registry Python Library Usage | ||
|
||
This document introduces Model Registry Python library and some of its methods for registering and viewing models inside the Model Registry, however this should not be considered as full library reference. This is only is only used as a document to how start using the Model Registry. Refer the Python library documention for full library reference. | ||
|
||
## Prerequisites | ||
It is expected that you have access to Open Datahub Dashboard | ||
<ol> | ||
<li> You have logged into Dashboard | ||
<li> Created a "Data Science Project" | ||
<li> Configured any Cluster Storage. | ||
<li> Configured Data Connections needed for your project. For creating a data conenction you would require connection details for S3 bucket. | ||
<li> Created Workbench and logged into it. | ||
</ol> | ||
|
||
once you have a Workbench available, log into the Jupyter Notebook and load this Python Jupyter Notebook [python-example-usage.ipynb](./python-example-usage.ipynb) for further instructions. | ||
|
||
To load the note book, click | ||
|
||
![Upload Files](./images/upload.png) | ||
|
||
to load the python notebook and follow directions. |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.