Import a model customized with AutoML SDK
This section describes how to import an AutoML SDK trained model and artifact to IA Cloud Enterprise as part of an Asset Bundle.
The importing flow includes the following steps:
- Add the artifact and the model you customized with AutoML SDK to an Asset Bundle.
- Deploy the Asset Bundle containing the artifact and the model to Control Tower.
- Check that the artifact and the model are imported successfully.
Add artifact and trained model to Asset Bundle
Within an Asset Bundle structure, both the artifact and the trained model reside in the automl directory, as shown below. For the complete structure, refer to the guide.
...
├── automl
│ ├── model
│ └── artifact
...
Prepare artifact for import
If you build a model in Maven with mvn clean install, the artifacts for the model are created under the ./deploy directory as ./deploy/%model_code%/%model_version%.
Example of the ./deploy directory structure
Assume, we build the following hypermodel:
@ModelDescription(
code = "se20ie",
title = "se20 ie",
description = "se20 ie model",
version = "1.0-SNAPSHOT",
type = ModelType.IE
)
@HypermodelConfiguration(Se20ieModelConfiguration.class)
public class Se20ieModel extends IeGenericSe20Hypermodel {}
After you run the mvn clean install command, the ./deploy directory for the hypermodel above has the following structure :

To import the built models, copy the entire content of the ./deploy directory into automl/artifact within the structure of the Asset Bundle to be deployed.
Prepare trained model for import
When you run model training locally, set id for your training configuration. This id is used as the trained model ID.
Once model training is finished, the output directory will contain the following structure:
...
├── id
│ ├── output
│ └── model
...
Example of the output directory structure
Assume, we train the following model:
LocalTrainingConfiguration configuration = LocalTrainingConfiguration.builder()
.inputDir(inputDirPath)
.outputDir(outputDirPath)
.fields(fields)
.id("training-se20-ie")
.parameters(parameters)
.build();
ModelRunner.run(Se20ieModel.class, configuration);
The resulting output directory for the model above has the following structure:

Copy the ./id/output/ directory with its content into the modeldirectory of the Asset Bundle to be imported.
note
During import, trained models are validated against corresponding artifacts. When such artifacts are missing on the target instance or in the bundle, the import fails.
Check the resulting Asset Bundle structure
Below, you can find an example of an Asset Bundle structure for importing two artifacts and two trained models:
%bundle_root%
├── automl
│ ├── model
│ │ ├── pss-classification-model-1-0-15
│ │ │ └── output
│ │ │ └── model-info.json
│ │ │ └── model
│ │ ├── nss_name_matcher_python_model
│ │ │ └── output
│ │ │ └── model-info.json
│ │ │ └── model
│ │ │ └──....
│ ├── artifact
│ │ ├── pss-classification-model
│ │ │ └── 1.0.15
│ │ │ │ └──lib
│ │ │ │ └──model.description
│ │ │ │ └──worker-training.yml
│ │ │ │ └── ...
│ │ ├── nss-name-model
│ │ │ └──1.0.0
│ │ │ │ └──lib
│ │ │ │ └──model.description
│ │ │ │ └──worker-training.yml
│ │ │ │ └──...
└── meta-info.json
Import Asset Bundle
See the instructions on importing an Asset Bundle:
via the Control Tower interface
via REST API
Check availability of imported assets
After the Asset Bundle import is completed successfully, the console shows the SUCCEEDED status of the procedure.
Login successful
Asset Bundle <C:\Users\John_Appleseed\Downloads\negativenews-package-10.1.zip> Import has started
Checking import status: Import in progress, attempt 1
Checking import status: Import in progress, attempt 2
Checking import status: Import in progress, attempt 3
Checking import status: Import in progress, attempt 4
Checking import status: Import in progress, attempt 5
Checking import status: Import in progress, attempt 6
Checking import status: Import in progress, attempt 7
Checking import status: Import in progress, attempt 8
Checking import status: Import in progress, attempt 9
Checking import status: Import in progress, attempt 10
Checking import status: Import in progress, attempt 11
Checking import status: Import in progress, attempt 12
Checking import status: Import in progress, attempt 13
Checking import status: Import in progress, attempt 14
Checking import status: Import in progress, attempt 15
Checking import status: Import in progress, attempt 16
Asset Bundle Import job finished with status: SUCCEEDED
C:\Users\John_Appleseed\Downloads>
To check the availability of the imported artifact and the model in Control Tower, follow the steps:
Go to the Manual Tasks page and select any Manual Task with the Draft status from the list.
Alternatively, choose a target Manual Task to automate in the Business Process Designer or create a Manual Task.
Go to the Configure AutoML tab of the selected Manual Task.
Select Train new model or Execute model.

In the Machine learning drop-down list, look for the title and the version of the imported artifact or trained model.
The artifact's title and version correspond to the ones contained in the
Hypermodelclass (from the examples above,se20 ieand1.0-SNAPSHOT). The model's title corresponds to theoutputdirectory ID (from the examples above,training-se20-ie).
Alternatively, to check whether the artifact or trained model are imported successfully, use the GET /bundle-import/{uuid} endpoint of the Asset Bundle migration API.