(v1) Update an Existing Model

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 Command Center

Pre-Requisites

To update a model using the ModelOp Command Center, you must:

  • Have an existing model, minimally in the form of a source code file (e.g. mymodel.py file).

  • Have registered the model with the ModelOp Center.

To update a model in ModelOp Command Center:

  1. Navigate to the ModelOp Command Center.

  2. In the left column, click Models.

     

  3. Select the model you want to modify from the list. This opens the Model Details page.

  4. In the “Model Info” tab of the Model Details page, the user can:

    1. In the “Edit Metadata” section:

      1. Edit the Model Name

      2. Edit the Model Description

      3. Add a tag

    2. In the “Edit Functions” section:

      1. Update each of the functions

    3. To save the changes, select the “Update Model” button in the top right:

    4.  

  5. In the “Sources” tab, the user can modify the source code files directly by:

    1. Selecting the source code file from the left

    2. The code appears in a code cell. Modify the code in the cell.

    3. Click the save icon in the top right corner of the cell.

  6. In the “Schemas” tab, the user can modify the input and/or output schema files directly by:

    1. Selecting the schema file from the left

    2. The schema file appears in a code cell. Modify the schema in the cell.

    3. Click the save icon in the top right corner of the cell.

  7. In the “Attachments” tab, the user can add or delete attachments:

    1. To delete an attachment:

      1. Open the Attachments tab. The list of attachments associated with the registered model should appear.

      2. Find the attachment that should be deleted.

      3. Click the delete icon. The attachment will be removed from the registered model.

    2. To add an attachment to an existing model:

      1. Open the Attachments tab. The list of attachments associated with the registered model should appear.

      2. Click the “add attachment” button in the top right

      3. Locate the file that should be added as an attachment from your local machine and select the file for upload.

      4. Click “Upload”

      5. Refresh the page. The attachment should be added to the registered model

 

Next Article: Model Lifecycle Manager: Automation >