CLI Usage

To execute the model runner, use the provided CLI:

$ acumos_dcae_model_runner --help
usage: acumos_dcae_model_runner [-h] [--timeout TIMEOUT] [--debug] model_dir

positional arguments:
  model_dir          Directory that contains either the dumped model.zip or
                     its unzipped contents.

optional arguments:
  -h, --help         show this help message and exit
  --timeout TIMEOUT  Timeout (ms) used when fetching.
  --debug            Sets the log level to DEBUG

DCAE Onboarding Example

The python-dcae-model-runner repository has an example/ directory that shows how an Acumos model can be onboarded as a DCAE component.

After executing the steps below, the directory should have this structure:

├── Dockerfile
├── dcae-artifacts
│   ├── component.json
│   ├── number-out.json
│   └── numbers-in.json
├── example-model
│   ├── metadata.json
│   ├── model.proto
│   └── model.zip
├── example_model.py
└── requirements.txt

Note: For this example, the requirements.txt file should reflect the packages and versions listed in example-model/metadata.json.


1) Create the Acumos model

The example_model.py script defines a simple Acumos model that can add two integers together. The following will generate example-model/:

python example_model.py

2) Build the docker image

docker build -t acumos-python-model-test:0.1.0 .

3) Onboard the Acumos model to DCAE

The onboarding procedure involves adding the component and data format artifacts provided in example/dcae-artifacts to the DCAE catalog.

Refer to the official DCAE onboarding documentation for the full procedure.