Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

This article describes how to update an existing model using Jupyter or the ModelOp Command Center.

Table of Contents

Update an existing model using git

Changes made to the remote branch from which the model was imported into ModelOp Center will automatically sync with ModelOp Center. See Integrate with Git for more information.

Update an existing model using Jupyter

There are multiple ways to update an existing model using the Jupyter plugin.

Pre-requisites

After registering a model with ModelOp Center, it is possible to update the model when it is open in the Notebook. Registration can be done with the steps outlined in Registering a new model or Opening an existing model (see Register a Model and Opening an existing model in Jupyter).

Editing the source code

Once the model has been loaded from ModelOp Center, make the modifications to the source code as desired using standard Jupyter cell edit techniques.

When the changes are complete, click on the “Update current model in ModelOp Center“ icon from the ModelOp Center toolbar.

A prompt will ask confirm the changes made to cell contents before updating the model. This option copies back the source code of the selected cell into ModelOp Center.

Updating model metadata fields

From the toolbar, click on the “Edit current model” icon.

Please ensure have selected the notebook cell with an associated model, and the plugin will prompt with a screen that allows to change the following:

  1. Edit the Model Information

    1. Change Model Name

    2. Change the model Description

  2. Edit the model functions associated with the primary source code. Please refer to “Registering a new model” section of this guide or here for more details. Please note that in order to avoid versioning conflicts, make sure to save all code modifications as indicated in the step “Editing the source code” above before changing the model functions. This will prevent recently introduced function definitions in the code to be associated before the code itself is synced back to ModelOp Center.

This step also sends information of the underlying Notebook environment in which this is run (system details, python details and libraries loaded) to ModelOp Center

Adding attachments

From the toolbar, click on the “Add attachment for existing model” icon.

Please make sure the notebook cell with an associated model is selected, and the plugin will prompt you with a file browser and a screen to attach selected file to the model in the active cell.

Select the role for the asset to upload or leave blank to be automatically determined by ModelOp Center based on the file type.

Click the “Attach” button to upload the attachment.

Update an Existing Model Using the ModelOp UI

To update a model in the ModelOp UI:

  1. Navigate to the ModelOp UI.

  2. In the left column, click Inventory.

  3. Change the drop-down to Implementations

  4. Select the model you want to modify from the list. This opens the Model Implementation page.

  5. Use the tabs to modify the appropriate section (Assets, Repository, Schema), as required

(Advanced) Switching a Model Implementation to a Use Case

Upon upgrade to ModelOp v3.3 or for other reasons, a user may want to change a model implementation to a Use Case.

Note: This is advanced functionality, so please proceed with caution.

To do so, please follow these steps:

  1. Identify the StoredModel id to be converted

 

In this example, we are converting a StoredModel type USE_CASE to a PYTHON3 Implementation.

Screenshot 2024-09-18 at 11.23.51 AM.png

 

  1. Define destination type to be used, from the next list of valid types.

  • PYTHON

  • PYTHON3

  • R

  • PFA

  • C

  • CPP

  • CC

  • JUPYTER

  • PFA_YAML

  • PFA_PPFA

  • JAVA

  • OCTAVE

  • DMN

  • CMMN

  • SAGEMAKER

  • DATAIKU

  • PYSPARK

  • USE_CASE

  • EXCEL

  • SAS

  • ENSEMBLE

  • VENDOR

  • MLFLOW

  • UNKNOWN

Any other value different than the list above wont work

  1. In swagger find the PATCH section inside StoredModel Entities, and input StoredModel ID to be converted.

Screenshot 2024-09-18 at 11.26.58 AM.png

 

Identify the type of conversion to execute.

e.g: From USE_CASE → Implementation of type PYTHON3

{
  "modelMetaData":{
   "type" : "PYTHON3"
  }
}

 

Screenshot 2024-09-18 at 11.26.58 AM.png

e.g: From Implementation typePYTHON3USE_CASE

{
  "modelMetaData":{
   "type" : "USE_CASE"
  }
}
Screenshot 2024-09-18 at 11.27.46 AM.png
  1. Hit Execute and confirm response HttpStatus is 200.

 

Screenshot 2024-09-18 at 11.27.30 AM.png

Edit

Next Article: Adding / Managing Model Assets >

  • No labels