Add a Model
In this phase, you have the following options to add a model:
- Build Model: You can choose to run a selection of pre-curated AI algorithms on the datasets defined in the previous phases, to analyze and build AI models. The list of supported algorithms and their modes as well as the data types supported for each mode are provided in the table below.
- Upload Model: You can upload an already trained model and use it to make predictions in the next phase. The supported trained models are Open Neural Network Exchange (ONNX) and Predictive Model Markup Language (PMML). You can upload the trained model through the file upload option or by providing an S3 location.
For more details about the AI algorithms please refer to Confidential AI-Algorithms.
Build a Model
To build a training model:
- On the Add Models page, click the ADD MODEL button to add a new model and then select Build Model to build a training model for the dataset created in the previous phase.
Figure 1: Build a model
In the “Build a Model” form: - Enter the
Training flow name
, that is, the name of the model, for example:Patient_Workflow1
. - In the Training Dataset field, select the training dataset on which you want to run the AI algorithm and build a trained model.
- In the Algorithm field, select the algorithm that you want to run on the dataset to build the training model. The algorithms available for selection are:
- Logistic regression
- Decision tree: Decision tree classification, Decision tree regression
- Support vector machine: Support vector machine classification, Support vector machine regression
- k-Nearest Neighbors
- XGBoost: Gradient-boosted decision tree regression, Gradient-boosted decision tree classification, Gradient-boosted random forest classification, Gradient-boosted random forest regression
- Select ML variables that you created in the Data Preparation phase.
- In the Model name field, enter the name of the output dataset. This is the output model that will be used in the data inference phase.
- Click BUILD MODEL to run the selected algorithm on the training data and build the model for inference.
Figure 2: Build a model
- After the training model is built, you will see the model created under the Training flows. To run the training model, click the RUN button below the model.
Figure 3: Run training model
- You will notice the Running indication at the bottom of the workflow. At any point, if there is a need to stop the execution, click STOP. This will re-enable the RUN button.
Figure 4: Model training success
- If the model was executed successfully, you would see the status of the execution under the Execution Log. Click the Execution log link to view the log details.
Figure 5: Model training success
- Click the download report icon to download the execution log report.
Figure 6: Execution log
- After the execution is completed successfully, the model is now trained and ready for inference where it will be passed through a machine learning model for output data prediction.
Upload a Model
To upload an already trained model:
- On the Add Models page, click the ADD MODEL button to add a new model and then select Upload Model to upload an already trained model.
Figure 7: Upload a model
In the “Build a Model” form: - Enter the Model name, that is, the name of the model, for example:
logistic-regression-onnx-model
. - Select the Model type, for example: Logistic regression. This is optional.
- The Input type is CSV by default since the “Upload model” phase is only applicable for tabular datasets.
- In the Upload your Model section, select one of the following options:
- UPLOAD A FILE: Click browse to upload an un-encrypted model dataset. For example, if you are uploading an ONNX trained model, the filename will be
modelname.onnx
. If you are uploading an PMML trained model, the filename will bemodelname.pmml
.Figure 8: Upload a model
- S3 URL: Select this option to bring your trained model by connecting to an S3 account that contains either an encrypted model dataset or an un-encrypted model dataset. Refer to User's Guide: Preparing Your S3 Bucket for Confidential AI. Enter the following details:
- S3 bucket URL: Enter the URL of the S3 location. The S3 URL should start with `s3://`.
- Access Key ID and Secret Key: Enter the Access Key ID and Secret keys for Confidential AI access to the data on your S3 account.
- Encryption key (optional): You can also provide an encryption key that was used to encrypt the data that is available on the S3 account. The encryption supported is AES-256-GCM and the provided encryption key is expected to be a 64 character long hex string.
- UPLOAD A FILE: Click browse to upload an un-encrypted model dataset. For example, if you are uploading an ONNX trained model, the filename will be
- Click RETRIEVE to save the S3 details and retrieve your trained model.
- Click SAVE MODEL to run the selected algorithm on the training data and build the model for inference.
Figure 9: Upload a model from S3
- After the training model is uploaded, you will see the model created under the Uploaded Models tab.
Figure 10: Uploaded trained model
- The trained model is now uploaded successfully and ready for inference where it will be passed through a machine learning model for output data prediction.
Comments
Please sign in to leave a comment.