Сообщение об ошибке от Python. Проблема с использованием Package / Python - PullRequest
0 голосов
/ 11 марта 2020

У меня проблема с использованием pickle, до этого он хорошо работал с кодом. Но не знаю, что у меня установлено или изменяется. Кто-нибудь как его починить? Коды должны работать очень хорошо на самом деле. Я думаю, что что-то не так с моим ноутбуком вместо кодов.

Я сделал некоторые расчеты, используя счет от webgfi3 (другая часть, но все еще python код)

C:\Users\User 01\Desktop\GFI - SEKEJAP>python score_cases.py
C:\Users\User 01\AppData\Local\Programs\Python\Python38-32\lib\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)
C:\Users\User 01\AppData\Local\Programs\Python\Python38-32\lib\site-packages\sklearn\utils\deprecation.py:144: FutureWarning: The sklearn.ensemble.forest module is  deprecated in version 0.22 and will be removed in version 0.24. The corresponding classes / functions should instead be imported from sklearn.ensemble. Anything that cannot be imported from sklearn.ensemble is now part of the private API.
  warnings.warn(message, FutureWarning)
C:\Users\User 01\AppData\Local\Programs\Python\Python38-32\lib\site-packages\sklearn\utils\deprecation.py:144: FutureWarning: The sklearn.tree.tree module is  deprecated in version 0.22 and will be removed in version 0.24. The corresponding classes / functions should instead be imported from sklearn.tree. Anything that cannot be imported from sklearn.tree is now part of the private API.
  warnings.warn(message, FutureWarning)
C:\Users\User 01\AppData\Local\Programs\Python\Python38-32\lib\site-packages\sklearn\base.py:313: UserWarning: Trying to unpickle estimator DecisionTreeClassifier from version 0.19.1 when using version 0.22.2.post1. This might lead to breaking code or invalid results. Use at your own risk.
  warnings.warn(
Traceback (most recent call last):
  File "score_cases.py", line 5, in <module>
    from web_gfi3 import score_this
  File "C:\Users\User 01\Desktop\GFI - SEKEJAP\web_gfi3.py", line 202, in <module>
    predictor = joblib.load(stored_model_name)
  File "C:\Users\User 01\AppData\Local\Programs\Python\Python38-32\lib\site-packages\joblib\numpy_pickle.py", line 605, in load
    obj = _unpickle(fobj, filename, mmap_mode)
  File "C:\Users\User 01\AppData\Local\Programs\Python\Python38-32\lib\site-packages\joblib\numpy_pickle.py", line 529, in _unpickle
    obj = unpickler.load()
  File "C:\Users\User 01\AppData\Local\Programs\Python\Python38-32\lib\pickle.py", line 1210, in load
    dispatch[key[0]](self)
  File "C:\Users\User 01\AppData\Local\Programs\Python\Python38-32\lib\pickle.py", line 1587, in load_reduce
    stack[-1] = func(*args)
  File "sklearn\tree\_tree.pyx", line 607, in sklearn.tree._tree.Tree.__cinit__
ValueError: Buffer dtype mismatch, expected 'SIZE_t' but got 'long long'
Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...