Add Model Assets
Overview
ModelOp Center is designed to be agnostic to the type of model, the platform on which the model runs, and the data platforms with which the model interacts during various portions of the model lifecycle.
Types of Model Assets that may be used during the Model Life Cycle Include:
Trained model artifacts
Requirements (Dependencies) lists
Data assets
Schemas
How to add Assets
During Model Import
Please see Register a Model to get details about adding assets during model import.
Via ModelOp UI
Upload a local File
Go to the Model Details page by clicking on the model from the Models page
Go to the Model Details PageGo to the Assets page by clicking on Assets
Go to Assets PageClick on Upload File which should open a dialog box to select a local file.
The file to be uploaded will show up on the page. Depending on the file size, you will see 2 options: Embed and Upload. The Embed option stores the file in the ModelOp Center database while the Upload option will store the file in ModelOp Center controlled S3 bucket or HDFS store depending on the model type. Click the option best suited for the use case.
Once the Asset has been added, select the appropriate asset role. Optionally, add tags to the asset if required by the Model governance process.
Upload a File from a Remote Location
This option, at the moment, only supports copying assets from the remote S3 bucket. The option is set by the organization during the install. To confirm if the file will be copied to the ModelOp Center controlled bucket, please see the step 1 through 4.
Go to the Model Details page by clicking on the model from the Models page
Go to the Assets page by clicking on Assets
Click on the Add By URL button
Enter the URL for the asset in the URL field of the dialog box. You will see a note mentioning if the file will be copied to the ModelOp Center controller S3 bucket
Select the type to be S3 (which should be by default selected based on the URL)
Select the region for the S3 location and click Add Asset button
Once the Asset has been added, select the appropriate asset role. Optionally, add tags to the asset if required by the Model governance process.
Steps to automatically copy from an existing s3 location to a MOC-controlled location
Provide a File by Reference
Go to the Model Details page by clicking on the model from the Models page
Go to the Assets page by clicking on Assets
Click on the Add By URL button
Enter the URL for the asset in the URL field of the dialog box.
Select the type to be S3 or HDFS depending on where the asset is
This step is only required if you select type to be S3 on previous step. Select the region for the S3 location and click Add Asset button
Once the Asset has been added, select the appropriate asset role. Optionally, add tags to the asset if required by the Model governance process.
Provide a SQL Asset
Please see Integrate with SQL Databases to understand how ModelOp Center integrates with SQL databases. Once you get familiar with how ModelOp Center handles SQL Assets, follow these steps to add SQL assets to a given model.
Via CLI
Please see the asset command for adding assets using the CLI.
Data Assets
ModelOp Center “Assets” that support various data technologies:
S3 Files
HDFS Files
SQL Asset
Summary of example activities where a User or an MLC may use a Data Asset:
Action | Data Required | Available via: | MOC Asset Examples [ASSET_ROLE : EXAMPLE} |
Add an Attachment (to a StoredModel) | All types | CLI: s3 & embedded assets only UI: all API: all | Applicable to S3, HDFS, and SQL Asset |
Run a Metrics Job (e.g. “Back Test” using labeled data) | •Evaluation Data | CLI, UI, API, MLC | S3: •Test_Data: s3://<model_base>/EvaluationData.csv HDFS: •Test_Data: hdfs://<model_base>/EvaluationData.csv SQL Asset: •Test_Data: SELECT * FROM <read_only_Eval_table> WHERE <conditions> |
Run a Data Drift Job | •Training/Baseline Data •Comparator Data | CLI: would trigger the API API, MLC | S3: •Training_Data: s3://<model_base>/TrainingData.csv •Compare_Data: s3://<model_base>/ComparatorData.csv HDFS: •Training_Data: hdfs://<model_base>/TrainingData.csv •Compare_Data: hdfs://<model_base>/ComparatorData.csv SQL: •Training_Data: SELECT * FROM <read_only_Training_table> WHERE <conditions> •Compare_Data: Training: SELECT * FROM <read_only_Comparator_table> WHERE <conditions> … may need to have tag to specify input vs. output comparator data |
Run a Model Concept Drift Job | •Training/Baseline Data •Comparator Data | CLI: would trigger the API API, MLC | S3: •Training_Data: s3://<model_base>/TrainingData.csv •Compare_Data: s3://<model_base>/ComparatorData.csv HDFS: •Training_Data: hdfs://<model_base>/TrainingData.csv •Compare_Data: hdfs://<model_base>/ComparatorData.csv SQL: •Training_Data: SELECT * FROM <read_only_Training_table> WHERE <conditions> •Compare_Data: Training: SELECT * FROM <read_only_Comparator_table> WHERE <conditions> … may need to have tag to specify input vs. output comparator data |
Run a Bias Detection Job | •Evaluation Data | CLI, UI, API, MLC | S3: •Test_Data: s3://<model_base>/EvaluationData.csv HDFS: •Test_Data: hdfs://<model_base>/EvaluationData.csv SQL Asset: •Test_Data: SELECT * FROM <read_only_Eval_table> WHERE <conditions> |
Run a Training Job | •Training Data | MLC, UI, API | S3: •Training_Data: s3://<model_base>/TrainingData.csv HDFS: •Training_Data: hdfs://<model_base>/TrainingData.csv SQL Asset: •Training_Data: SELECT * FROM <read_only_Training_table> WHERE <conditions> |
Other Assets
Trained Model Artifacts
ModelOp Center supports Trained Model Artifacts stored in S3 bucket or HDFS (does not support as SQL Asset). When adding asset that is used as Trained Model Artifact, please select the asset role to be “Weights File” or “Model Binary File” depending on the use case.
Schemas
ModelOp Center runtime supports data schemas which helps to enforce specif type of on different fields. The schema can be used for input data and/or output data. When uploading a schema, select “Model Schema” asset role.
Requirements
ModelOp runtime comes with basic pre-installed libraries for different model and languages. If the model requires additional libraries to be installed by the ModelOp Runtime, it supports defining model library requirements in requirements.txt
file. The ModelOp runtime will check the requirements file before running the model and install the missing libraries. When uploading the requirements file, please select the asset role of “Requirements”.
Next Article: Model Life Cycle Management: Overview >