You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[2020-09-20 17:08:04,956] ERROR in app: Exception on /thanks [POST]
Traceback (most recent call last):
File "C:\Users\fw_hh\AppData\Local\Programs\Python\Python38\lib\site-packages\flask\app.py", line 2447, in wsgi_app
response = self.full_dispatch_request()
File "C:\Users\fw_hh\AppData\Local\Programs\Python\Python38\lib\site-packages\flask\app.py", line 1952, in full_dispatch_request
rv = self.handle_user_exception(e)
File "C:\Users\fw_hh\AppData\Local\Programs\Python\Python38\lib\site-packages\flask\app.py", line 1821, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "C:\Users\fw_hh\AppData\Local\Programs\Python\Python38\lib\site-packages\flask_compat.py", line 39, in reraise
raise value
File "C:\Users\fw_hh\AppData\Local\Programs\Python\Python38\lib\site-packages\flask\app.py", line 1950, in full_dispatch_request
rv = self.dispatch_request()
File "C:\Users\fw_hh\AppData\Local\Programs\Python\Python38\lib\site-packages\flask\app.py", line 1936, in dispatch_request
return self.view_functionsrule.endpoint File "E:\机器学习\python-machine-learning-book-2nd-edition-master\code\ch09\movieclassifier\app.py", line 73, in feedback
train(review, y)
File "E:\机器学习\python-machine-learning-book-2nd-edition-master\code\ch09\movieclassifier\app.py", line 30, in train
clf.partial_fit(X, [y])
File "C:\Users\fw_hh\AppData\Local\Programs\Python\Python38\lib\site-packages\sklearn\linear_model_stochastic_gradient.py", line 680, in partial_fit
self._validate_params(for_partial_fit=True)
File "C:\Users\fw_hh\AppData\Local\Programs\Python\Python38\lib\site-packages\sklearn\linear_model_stochastic_gradient.py", line 128, in _validate_params
if not isinstance(self.early_stopping, bool): AttributeError: 'SGDClassifier' object has no attribute 'early_stopping'
The text was updated successfully, but these errors were encountered:
Hi there. As far as I know, the early_stopping parameter was added in scikit-learn 0.20. So, my possible explanation for this error could be that the pickle file of the trained SGDClassifier you created in the previous chapter uses a different scikit-learn version than the scikit-learn version that is used when running the web app.
[2020-09-20 17:08:04,956] ERROR in app: Exception on /thanks [POST]
Traceback (most recent call last):
File "C:\Users\fw_hh\AppData\Local\Programs\Python\Python38\lib\site-packages\flask\app.py", line 2447, in wsgi_app
response = self.full_dispatch_request()
File "C:\Users\fw_hh\AppData\Local\Programs\Python\Python38\lib\site-packages\flask\app.py", line 1952, in full_dispatch_request
rv = self.handle_user_exception(e)
File "C:\Users\fw_hh\AppData\Local\Programs\Python\Python38\lib\site-packages\flask\app.py", line 1821, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "C:\Users\fw_hh\AppData\Local\Programs\Python\Python38\lib\site-packages\flask_compat.py", line 39, in reraise
raise value
File "C:\Users\fw_hh\AppData\Local\Programs\Python\Python38\lib\site-packages\flask\app.py", line 1950, in full_dispatch_request
rv = self.dispatch_request()
File "C:\Users\fw_hh\AppData\Local\Programs\Python\Python38\lib\site-packages\flask\app.py", line 1936, in dispatch_request
return self.view_functionsrule.endpoint
File "E:\机器学习\python-machine-learning-book-2nd-edition-master\code\ch09\movieclassifier\app.py", line 73, in feedback
train(review, y)
File "E:\机器学习\python-machine-learning-book-2nd-edition-master\code\ch09\movieclassifier\app.py", line 30, in train
clf.partial_fit(X, [y])
File "C:\Users\fw_hh\AppData\Local\Programs\Python\Python38\lib\site-packages\sklearn\linear_model_stochastic_gradient.py", line 680, in partial_fit
self._validate_params(for_partial_fit=True)
File "C:\Users\fw_hh\AppData\Local\Programs\Python\Python38\lib\site-packages\sklearn\linear_model_stochastic_gradient.py", line 128, in _validate_params
if not isinstance(self.early_stopping, bool):
AttributeError: 'SGDClassifier' object has no attribute 'early_stopping'
The text was updated successfully, but these errors were encountered: