This repository contains the Models as a Service (MaaS) API for World Modelers.
The goal of this project is to provide an easy to use, descriptive middleware layer API to facilitate model search and discovery, exploration, configuration, and execution.
Model exploration is managed through the Exploration Controller
. The Exploration Controller
allows a user to obtain a model's description, understand its parameters, obtain an example/default configuration, and understand its outputs.
This is further enabled through the Concepts Controller
which maps concepts
to models, model outputs, and model parameters. A client may request a list of all concepts that are mapped to models in MaaS and may submit a single concept to learn which related models, outputs and parameters are tied to it in MaaS.
Model execution is managed by the Execution Controller
. Models consist of pre-built Docker images that are hosted on an arbitrary server. Running a model requires the creation of a specific model controller, such as this one for Kimetrica's malnutrition model. The model controller is responsible for obtaining a model configuration and tasking Docker to run the model image inside a container with the given configuration. The model controller specifies a Docker container entrypoint, such as this one. The model controller is then responsible for storing the output results file(s) to S3 and ingesting the normalized results into the MaaS database.
Models may be run using the /run_model
endpoint. For more information on model execution, refer to docs/model-execution.md
. Currently, MaaS supports the following models:
- Kimetrica Population Model
- Kimetrica Malnutrition Model
- Food Shocks Cascade Model
- DSSAT
- Atlas.ai Consumption Model
- Atlas.ai Asset Wealth Model
- CHIRPS
- CHIRPS-GEFS
- LPJmL Yield Anomalies
- World Pop Africa
- Flood Severity Index Model
- PIHM
After installation and setup, you can run MaaS from the REST-Server
directory with:
python -m openapi_server
You can access the UI at http://0.0.0.0:8080/ui.