Acumos Python Model Runner User Guide¶
The acumos_model_runner
package installs a command line tool acumos_model_runner
for running models created by the Acumos Python client library.
The model runner provides an HTTP API for invoking model methods, as well as a Swagger UI for documentation. See the tutorial for more information on usage.
Installation¶
You will need a Python 3.4+ environment in order to install acumos_model_runner
.
You can use Anaconda
(preferred) or pyenv to install and
manage Python environments.
The acumos_model_runner
package can be installed with pip:
$ pip install acumos_model_runner
Command Line Usage¶
usage: acumos_model_runner [-h] [--host HOST] [--port PORT]
[--workers WORKERS] [--timeout TIMEOUT]
[--cors CORS]
model_dir
positional arguments:
model_dir Directory containing a dumped Acumos Python model
optional arguments:
-h, --help show this help message and exit
--host HOST The interface to bind to
--port PORT The port to bind to
--workers WORKERS The number of gunicorn workers to spawn
--timeout TIMEOUT Time to wait (seconds) before a frozen worker is
restarted
--cors CORS Enables CORS if provided. Can be a domain, comma-
separated list of domains, or *