Run Prediction Service
This page provides instructions for running the Scan Manager Prediction Service for Certifai Enterprise.
Scan Manager is an interface that assists users in configuring use cases, models, datasets and scan options that run in Certifai.
NOTE
Scans can also be configured using the scan-definition.yaml.
Prerequisites
- Scan Manager setup is complete.
- For H2O Mojo: Your model
.mojo
file and H2O license are placed at the locations defined inenvironment.yml
file. - For Python: Your model
.pkl
file is placed at the respective location defined inenvironment.yml
file. - For R: Your model
.rds
file is either placed atmodel/model.rds
or your cloud storage and model path is configured inenvironment.yml
.
Run Prediction Service for Testing
Run the following command, which calls the Docker image using environment variables from the environment.yml
.:
./generated-container-model/container_util.sh run
This command creates a Docker container running locally, with the prediction service exposed on port 8551.
Troubleshoot
If you get an error such as:
FileNotFoundError: [Errno 2] No such file or directory: 'model/pipeline.mojo'
,
make sure you have configured the path to cloud storage and pushed your model to that location.
Test Scan Manager
Make a request to http://127.0.0.1:8551/predict
with the respective parameters, or use Certifai to test the endpoint against a scan definition certifai definition-test -f scan_def.yaml