Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

model2.predict(X_test), get IndexError by use custom_loss! #10

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

traderlife8
Copy link

model2.predict(X_test)

get IndexError on Python 3.8.8 64-bit, and Python 3.9.7, like this:

Traceback (most recent call last):

File "E:\py\catboost\tutorials\custom_loss\custom_loss_and_metric_tutorial.py", line 187, in
model2.predict(X_test,thread_count=1,prediction_type='Class')

File "C:\ProgramData\Anaconda3\lib\site-packages\catboost\core.py", line 4772, in predict
return self._predict(data, prediction_type, ntree_start, ntree_end, thread_count, verbose, 'predict', task_type)

File "C:\ProgramData\Anaconda3\lib\site-packages\catboost\core.py", line 2220, in _predict
predictions = self._base_predict(data, prediction_type, ntree_start, ntree_end, thread_count, verbose, task_type)

File "C:\ProgramData\Anaconda3\lib\site-packages\catboost\core.py", line 1516, in _base_predict
return self._object._base_predict(pool, prediction_type, ntree_start, ntree_end, thread_count, verbose, task_type)

File "_catboost.pyx", line 4529, in _catboost._CatBoost._base_predict

File "_catboost.pyx", line 4546, in _catboost._CatBoost._base_predict

File "_catboost.pyx", line 1609, in _catboost.transform_predictions

File "_catboost.pyx", line 5350, in _catboost._convert_to_visible_labels

IndexError: index 0 is out of bounds for axis 0 with size 0

model2.predict(X_test)
File "_catboost.pyx", line 4546, in _catboost._CatBoost._base_predict
  File "_catboost.pyx", line 1609, in _catboost.transform_predictions
  File "_catboost.pyx", line 5350, in _catboost._convert_to_visible_labels
IndexError: index 0 is out of bounds for axis 0 with size 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant