Dynamically make prediction based on phase_id and prob_id:
Implement a function to create corresponding Predictor and SQLModel
The Predictor needs to dynamically load the right registered model from mlflow based on phase_id and prob_id
The SQLModel needs to save the raw data from the request to the PostgreSQL server
Load latest raw data from postgres: The data scientist will send request to this route to get the latest data for researching and creating new model.
Notes for Data Scientist:
When training a model: specify the python packages used to create the model in all requirements.txt files: deployment/pip_requirements/*requirements.py;
!!!Make sure the packages and their versions are matched both in the api server and the mlflow server.
So that the API can correctly run the loaded mlflow model