Publish Models

Trained model can be published in the form of following packages:

  • MLaC
  • Python Package
  • Model Container
  • Retrained Model

MLaC: Machine Learning as Code generates code automatically based on ML Operations performed during various ML Lifecycle. Using MLaC, expert data scientists can have better control over experimentation, optimization & deployment of ML Models.

MLaC has the following unique component:

  1. Generate Code: Generates the code for each pipeline component of the selected use case i.e., data transformations, feature engineering, model training and prediction. This code can further be used to retrain the model on the latest data and can also be used to create a container for each component. The user will find the code in the local system through path: C:\Users\yashaswini.ragi\AppData\Local\HCLT\AION\target\AION_375_1\publish\MLaC .

Python Package: Python Package creates a WHL File of a trained model so that the user can further use that file in testing and prediction. If the user wants to consume the trained model for prediction in some system where Marketing AION is not there, then either the user can install a python package or use the docker images.

Python package can be consumed by completing the following the steps:

  1. Click on the python package icon from the packages tab and as a result whl file will get download.
  2. Open the command prompt and type the command: python -m pip install whl_file_path and press Enter.

Model container: The model container creates a docker image of the trained model so that user can use that image anywhere, pull the image, and perform testing. If the user wants to consume the trained model for prediction purpose in some system where Marketing AION is not there, then either the user can install it as python package or use the docker images.

There are two cases to create a docker container:
  1. When the Docker is installed in the machine user can click on the docker and it gets created.
  2. In case Docker is not installed, running Marketing AION will throw an error. For that user can copy the mentioned path file and put in other machine where the docker should be installed and can build the image there also using docker build command.

The model container also supports CORS (Cross-Origin Resource Sharing) protocol to mitigate the default security policy, Same-Origin Policy (SOP) used by the browsers to protect resources. The same-origin policy is a critical security mechanism that restricts a documents or script loaded by one origin can interact with a resource from another origin.

Command to enable CORS: python aion_service.py ip 0.0.0.0 -p 80 -cors “http://localhost:5000”

Model Retraining

  • After the Model got trained go to the Home.
  • From the Train column click on the Model Re-training icon to re-train the model withing Re-Configuring.

    For Re-Configuring and training click on the Retrain icon.

  • Click On EDA if required or click on Next.
  • Set the Basic and Advance configuration if required.
  • Click Train Model tab to train the model.
  • Model will get Re-trained successfully and user can see the results.