- Poetry osx / linux / bashonwindows install instructions:
curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python -Check more details in Poetry Docs.
- RClone
To install rclone on Linux/macOS/BSD systems, run:
curl https://rclone.org/install.sh | sudo bashCheck more details in RClone Download.
- Install project with poetry
poetry install- Run MlFlow Server
make run-mlflow- Train a model with given script.
poetry run python tutorial/train.py- Go to mlflow ui page and check its run id
- Download model to local with
ml-service sync.
poetry run ml-service sync --run-id=...- Check download is complete.
ls mnt/artifacts/model/If completed you'll get result as below
MLmodel conda.yaml model.pkl python_env.yaml requirements.txt- Run fastapi server with
ml-service server.
poetry run ml-service server --model-name "model" --artifact-path "mnt/artifacts"- Check fastapi docs site:
- Go to FastAPI docs site:
- Check engine post
- Write
predict_methodto use, in this tutorial we usepredict. And click excute.
- After excute, you can get result as below:
Buffer domain save input data to postgres server.
- postgresql
Install postgresql with instruction [LINK].
- init db folder to start:
make initdb- run postgresql server:
make run-postgres- add user to postgresql server:
make init-user- Run fastapi server with
ml-service serverwith--use-bufferargument.
poetry run ml-service server --model-name "model" --artifact-path "mnt/artifacts" --use-buffer- Use buffer domain and execute.
-
Connect to DB with below information:
- db: postgres
- user: postgres
- password: password
-
Check
inputtable:





