Xtra-Computing / thundergbm

ThunderGBM: Fast GBDTs and Random Forests on GPUs
Apache License 2.0
689 stars 84 forks source link

Predict when data size is one sample #43

Closed TAOinfoWr closed 4 years ago

TAOinfoWr commented 4 years ago

There is one situation need to predict one sample at one time. I find some problem when i predict with one sample, but there is no error when sample number greater than two .

could someone tell me is it a bug ? or i have wrong operation .thanks the follow is my code and error message and os information.

------------------------------------------------------------------------

import numpy as np import pandas as pd import time from thundergbm import TGBMClassifier

------------------------------------------------------------------------------

clf=TGBMClassifier(verbose=1) x1=np.random.random((40,2)) y1=np.random.randint(0,2,40)

clf.fit(x1,y1) clf.predict(x1[3,:])

------------------------------------------------------------------------------

error message

2020-04-21 20:00:12,855 INFO [default] #instances = 1, #features = 2 2020-04-21 20:00:12,858 INFO [default] use shared memory to predict 2020-04-21 20:00:12,858 FATAL [default] Check failed: [size_ > 0] 2020-04-21 20:00:12,858 WARNING [default] Aborting application. Reason: Fatal log at [/home/admin/Desktop/EverComm_ibpem_gpu/thundergbm/include/thundergbm/syncarray.h:71] Aborted (core dumped)

------------------------------------------------------------------------

os information.

Ubuntu 16.04 NVIDIA driver : 440.44 CUDA Version: 10.2 GPU - GeForce RTX 2080

Kurt-Liuhf commented 4 years ago

Hi @TAOinfoWr, thank you for your feedback. The problem is fixed. You can reinstall ThunderGBM and have a try.

TAOinfoWr commented 4 years ago

it works, thank you!