User's Guide: Add a Model

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.
NOTE
  • This phase is applicable only for tabular datasets.
  • In the “Build a model” option, the algorithms supported are SVM, Decision Trees, KNN, Logistic Regression, and XGBoost (Gradient-Boosted Trees and Gradient-Boosted Random Forest) that supports tabular datatypes and can be used to build a trained model on the datasets.
  • In the “Upload a model” option, the algorithms supported are SVM, Decision Trees, KNN, and Logistic Regression that support tabular datatypes to upload pre-trained ONNX and PMML models.
  • In the “Upload a model” option, only non-encrypted models can be uploaded from the file system. Whereas the S3 option supports both encrypted and non-encrypted files.

For more details about the AI algorithms please refer to Confidential AI-Algorithms.

Build a Model

To build a training model:

  1. 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. CAI_AddModelBuild.pngFigure 1: Build a model
    In the “Build a Model” form:
  2. Enter the Training flow name, that is, the name of the model, for example: Patient_Workflow1.
  3. In the Training Dataset field, select the training dataset on which you want to run the AI algorithm and build a trained model.
  4. 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
  5. Select ML variables that you created in the Data Preparation phase.
  6. 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.
  7. Click BUILD MODEL to run the selected algorithm on the training data and build the model for inference. CAI__BuildModel.pngFigure 2: Build a model
  8. 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.
    CAI_RunTrainingModel.pngFigure 3: Run training model
  9. 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. CAI_BuildRunning.pngFigure 4: Model training success
  10. 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. CAI_BuildSuccess.pngFigure 5: Model training success
  11. Click the download report icon to download the execution log report. CAI_ExecutionLog.png Figure 6: Execution log
  12. 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:

  1. 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. CAI_AddModelUpload.pngFigure 7: Upload a model
    In the “Build a Model” form:
  2. Enter the Model name, that is, the name of the model, for example: logistic-regression-onnx-model.
  3. Select the Model type, for example: Logistic regression. This is optional.
  4. The Input type is CSV by default since the “Upload model” phase is only applicable for tabular datasets.
  5. In the Upload your Model section, select one of the following options:
    1. 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 be modelname.pmml. CAI_UploadModelLogistic.pngFigure 8: Upload a model
    2. 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.
      NOTE
      The model size is limited to 200 MB per training model for the 3.16 release.
  6. Click RETRIEVE to save the S3 details and retrieve your trained model.
  7. Click SAVE MODEL to run the selected algorithm on the training data and build the model for inference. CAI_UploadModelS3.png CAI_UploadModelS3-1.png Figure 9: Upload a model from S3
  8. After the training model is uploaded, you will see the model created under the Uploaded Models tab. CAI-SavedUploadedModel.pngFigure 10: Uploaded trained model
  9. 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.

Was this article helpful?
0 out of 0 found this helpful