Newer
Older
# monitor_ml_flask
This is a demo showing possible ways to monitor machine learning models using prometheus, Loki & Grafana.
## How to run it
After cloning the repo, on the command line type
`cd monitor_ml_with_flask`
`docker-compose up`
## Predictions
This demo uses a simple linear regression model to predict sale house prices based on the following features (as defined in code):
- grade
- lat
- long
- sqft_living
- waterfront
- yr_built
The application is available in this url (http://localhost:80). Using RESTful API, it is possible to send request to the serving model using a POST request followed by the headder, then the input as shown below.
`curl -X POST -H "Content-Type: application/json" -d '{"grade":9.0,"lat":37.45,"long":12.09,"sqft_living":1470.08,"waterfront":0.0,"yr_built":2008.0}' http://localhost:80/predict_price`
Reference: https://github.com/abhinavsagar/machine-learning-deployment
## IPs & Ports to use for setup in Grafana
To setup Grafana, use the following url,
Grafana: http://localhost:3000 (username: admin, password: admin)
Prometheus: http://10.5.0.7:9090
Loki: http://10.5.0.9:3100