UIで実行:文字列を受け取り、文字列を受け取り、それをバックエンドに持ち込み(Flaskを使用して、main.py
という名前で)、MLマジックを行い、JSONをフロントエンドに返します。Google App Engine POST 500モジュールがありませんsklearn.pipeline
UIをローカルで実行すると問題はありませんが、GoogleのApp Engineにデプロイすると状態500になります。ログを見ると、私にはmoduleError: No module named sklearn.pipeline
があります。これは使用しないでくださいこの時点では何をするに
Traceback (most recent call last):
File "/env/local/lib/python2.7/site-packages/flask/app.py", line 1982, in wsgi_app
response = self.full_dispatch_request()
File "/env/local/lib/python2.7/site-packages/flask/app.py", line 1614, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/env/local/lib/python2.7/site-packages/flask/app.py", line 1517, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/env/local/lib/python2.7/site-packages/flask/app.py", line 1612, in full_dispatch_request
rv = self.dispatch_request()
File "/env/local/lib/python2.7/site-packages/flask/app.py", line 1598, in dispatch_request
return self.view_functions[rule.endpoint](**req.view_args)
File "/home/vmagent/app/main.py", line 61, in run_pipeline
text_clf = pickle.load(handle)
ImportError: No module named sklearn.pipeline
{
insertId: "1mjwzxmecegyg"
labels: {
appengine.googleapis.com/instance_name: "aef-default-20171019t101524-k2kk"
compute.googleapis.com/resource_id: "7187158353674854010"
compute.googleapis.com/resource_name: "31d3314567f8"
compute.googleapis.com/zone: "us-central1-b"
}
logName: "projects/maximal-ascent-183217/logs/appengine.googleapis.com%2Fstderr"
receiveTimestamp: "2017-10-19T17:37:19.968312342Z"
resource: {
labels: {
module_id: "default"
project_id: "maximal-ascent-183217"
version_id: "20171019t101524"
}
type: "gae_app"
}
textPayload: "Traceback (most recent call last):
File "/env/local/lib/python2.7/site-packages/flask/app.py",
line 1982,
in wsgi_app
response = self.full_dispatch_request()
File "/env/local/lib/python2.7/site-packages/flask/app.py",
line 1614,
in full_dispatch_request
rv = self.handle_user_exception(e)
File "/env/local/lib/python2.7/site-packages/flask/app.py",
line 1517,
in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/env/local/lib/python2.7/site-packages/flask/app.py",
line 1612,
in full_dispatch_request
rv = self.dispatch_request()
File "/env/local/lib/python2.7/site-packages/flask/app.py",
line 1598,
in dispatch_request
return self.view_functions[rule.endpoint](** req.view_args)
File "/home/vmagent/app/main.py",
line 61,
in run_pipeline
text_clf = pickle.load(handle)
ImportError: No module named sklearn.pipeline "
timestamp: "2017-10-19T17:37:18Z"
}
混乱:私のrequirements.txt
。ここのログビューアからのトレースバックオブジェクトです私はモジュールをインストールし、私のmain.pyでそれを使用する必要がありますか?