Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Setting up the MOC_INSTANCE_URL environment variable with the base URL, e.g.: “http://modelop:8090” before running the jupyter notebook. Please note for Jupyterhub installations that the environment variables aren’t automatically passed to the notebook, but rather need to be whitelisted. See here for details on how to achieve this.

  2. Using the nbextensions configurator found in contrib nbextensions package. Once available this will provide an additional tab “Nbextensions” where you will be able to:

    1. Enable/Disable the plugin altogether.

    2. Override the environment variable with an arbitrary URL provided at the configurator itself.

    3. Specify the environment variable name if MOC_INSTANCE_URL is not desired to hold the base URL

      Image RemovedImage Added

ModelOp specific functions available within Jupyter

...

  1. The “Add Model to Model Operations Center” window opens. Click in the left side of the code cells to designate that the code is part of the model. The selected cells will have a highlighted green border on the left.

    Image RemovedImage Added

  2. Click Next. In theModel Information”section, type the Model Name. Optionally, you can add a brief Description of the model.

    Image RemovedImage Added

  3. Click Next. In the “Cell details” section:

    1. Choose your remote repository configuration. Make sure you have already configured ModelOp Center with access to your git repositories.
      If the Git Remote text field is blank it will create a local (to ModelOp Center) git repository (no remote repository associated).
      If the Git Remote text field is provided (with a valid accesible git repository URL), the local copy will be associated with given remote repository.
      Check Use default repo option if you want the same git remote and branch for all the source code assets (cells). Otherwise, you can specify each asset with a different remote url or branch.
      You can entirely disable git handling by switching off the Remote repo configuration toggle. This will in turn handle the source code assets using ModelOp Center internal storage only.

    2. Provide a File Name, and select Primary Model Source if appropriate.
      The file name will be complemented with a default extension, but it can be provided by the input text field as part of the file name.
      A model must have one and only one primary source code, which is where it will look for the model functions (more on model functions in the next step).

      Image RemovedImage Added

  4. Click Next. Specify the model functions used in your code. For additional information on the model functions please see here.
    ModelOp Center allows the user to associate the triggering operations with specific code functions. Additionally it can identify if the functions already have predefined model functions associated via “smart tags”. These optional “smart tags” should be presented as comments in the line above the function definition and the supported comments are:
    - modelop.init
    - modelop.score
    - modelop.metrics
    - modelop.training
    For example:

    Code Block
    languagepy
    # modelop.init
    def begin():
    ...

    You will find that the functions identified from source with a smart tag, are already associated with one of the functions and this selection is not modifiable (if you wish to change the function associated, please change or remove the smart tag comment).
    Also the function associated via smart tag can no longer be used as another model function, but the other functions are still displayed as options for the other associations.

    Image RemovedImage Added

  5. Click Next. On the next screen, add any attachments that go with the model and select an asset role for each of the files to upload. This will help ModelOp Center runtime identify the accompanying assets for different purposes accross the Model Life Cycle. Leave the asset role blank to let ModelOp Center automatically identify the asset based on the file type.

    Image RemovedImage Added

  6. Click Next. Review the summary. If you are satisfied, click Submit Model

...