Click the Import button in the upper-righthand corner
Input the URL for the repository and give the branch you would like to import
Click “Import Model from Git”
Once the model has imported, select the Attachments view from the new Model information page and check to make sure that Asset roles for each of the assets in the repo.
Register a Model Using a Jupyter Plugin
These instructions assume the following:
The Jupyter plugin is installed within your Jupyter environment.
The Jupyter plugin is enabled. To verify, go to the Nbextensions tab in Jupyter:
Select “ModelOp Center Services” if it is not already selected.
Enable the ModelOp Center Services. Click the “Enable” button at the bottom of the screen. It is enabled when the “Disable” button is highlighted in blue.
To register a model
Register a Model Using the ModelOp Center CLI
This procedure assumes the following:
You have installed the ModelOp Center command-line interface (CLI). For more details, see ModelOp CLI Reference.
You have an existing model, minimally in the form of a source code file (e.g. mymodel.py file)
When you register a model using the CLI, you have the following options:
You can add model attachments, such as a trained model artifact that results from model training.
You can include an input schema and/or an output schema with the model. These schemas enable the ModelOp Center to verify that the incoming and outgoing data adhere to the original model design intent. If preferred, you can disable schema checking by default, even if you upload input and/or output schemas.
To register a model from the CLI:
Create a model with a primary source code file.
At the command prompt, type:
moc model add <model name> <path to source code file>
a. (Optional) To include a schema associated with the model, use one or both of the following commands:
schema-in=<path for input schema>
schema-out=<path for output schema>
b. (Optional) When you include a schema with a model, schema checking is enabled by default. To override schema checking, use one of the following commands:
input-check-off — disables input schema checking for the model
output-check-off — disables output schema checking for the model
schema-check-off — disables both input and output schema checking for the model
Example: moc model add sample_model /path/to/model/model.py --schema-in=inputSchema.avsc --schema-out=outputSchema.avsc --schema-check-off
When the command in Step 2 is executed with all the options, a successful response looks like this:
Model added, ID: 1fbc8cc8-d5b2-40d1-913e-d30c4a71c16a
Note: if your source code file contains ModelOp Center “smart tag comments” for the primary functions of your model (see: Creating Production-Ready Models for more details), the CLI registration process automatically stores those function references for the newly registered model.
Once a model has successfully been registered, you may add model attachments. Type:
moc asset add <model name or UUID> <path to attachment>
Alternatively, an attachment can be added directly from an S3 bucket:
moc asset add <model name or UUID> [http/s3/S3n/S3a]://accessKey:secretKey@Domain/PATH/<filename> --region=us-east-1
To override the file name, add the --name=<string> option.
The MOC CLI determines whether to store the attachments in model-manage or external storage based on file size. Files larger than 10 MB are automatically stored in external storage, for efficiency. To control how the file is stored, use the following options:
: stores the file in model-manage if file size is less than 10 MB, or in external storage otherwise
: stores the attachment as external storage. If the file already exists in an external storage location (e.g. an AWS S3 bucket), provide a link to the asset in the following format:
[protocol]://ResourceAccessKey: ResourceSecretKey@ResourceDomain/PATH TO FILE/FILENAME.EXTENTION.
— Add to URL to tell CLI the region for the external storage.
moc asset add model_name attachment.zip -- external
moc asset add model_name http://$AKEY:$SKEY@modelop:9000/akash/output.json --region=default-region