Closed rb-mwindh closed 1 year ago
I've updated Flask to the current release (2.2.2 at the time being), by changing the requirements.txt
file:
// requirements.txt
Flask==2.2.2
pandas==1.1.5
scikit-learn==0.22.2
pylint==2.6.2
$ make install
$ python app.py
/home/testuser/.flask-ml-azure/lib/python3.8/site-packages/sklearn/externals/joblib/__init__.py:15: FutureWarning: sklearn.externals.joblib is deprecated in 0.21 and will be removed in 0.23. Please import this functionality directly from joblib, which can be installed with: pip install joblib. If this warning is raised when loading pickled models, you may need to re-serialize those models with scikit-learn 0.21+.
warnings.warn(msg, category=FutureWarning)
* Serving Flask app 'app'
* Debug mode: on
WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead.
* Running on all addresses (0.0.0.0)
* Running on http://127.0.0.1:5000
* Running on http://192.168.67.3:5000
Press CTRL+C to quit
* Restarting with stat
/home/testuser/.flask-ml-azure/lib/python3.8/site-packages/sklearn/externals/joblib/__init__.py:15: FutureWarning: sklearn.externals.joblib is deprecated in 0.21 and will be removed in 0.23. Please import this functionality directly from joblib, which can be installed with: pip install joblib. If this warning is raised when loading pickled models, you may need to re-serialize those models with scikit-learn 0.21+.
warnings.warn(msg, category=FutureWarning)
* Debugger is active!
* Debugger PIN: 123-456-789
I'm trying to get rid of the warning as well...
According to pip freeze
, my workspace is running with joblib==1.2.0
.
So I changed
// app.py
from flask import Flask, request, jsonify
from flask.logging import create_logger
import logging
import pandas as pd
# from sklearn.externals import joblib
import joblib
...
This solved the deprecation warning. I'm back on track, sorry for disturbing ;)
I'm all new to python, currently attending a course on machine learning. I've followed your instructions "by-the-letter", but when I run
python app.py
I get the following error message:Environment:
Can you please help me getting your sample app up-and-running?
Thanks ;)