Describing your model in our yaml-based format¶
To make your model chap-compatible, you need your train and predict endpoints (as discussed here) need to be formally defined in a YAML format that follows the popular MLflow standard.
Your codebase need to contain a file named MLproject
that defines the following:
An entry point in the MLproject file called
train
with parameterstrain_data
andmodel
An entry point in the MLproject file called
predict
with parametershistoric_data
,future_data
,model
andout_file
These should contain commands that can be run to train a model and predict the future using that model. The model parameter should be used to save a model in the train step that can be read and used in the predict step. CHAP will provide all the data (the other parameters) when running a model.
Here is an example of a valid MLproject file (taken from our minimalist_example).
The MLproject file can specify a docker image or Python virtual environment that will be used when running the commands. An example of this is the MLproject file contained within our minimalist_example_r.