Closed kiseno closed 2 years ago
Hi I got the following error when using predict_dist, PGBMRegressor:
pgbm\pgbm.py:1618, in PGBMRegressor.predict_dist(self, X, n_forecasts, parallel, output_sample_statistics) 1615 X = checkarray(X) 1616 X = X.astype(np.float32) -> 1618 return self.learner.predict_dist(X, n_forecasts, parallel, output_sample_statistics).cpu().numpy()
AttributeError: 'tuple' object has no attribute 'cpu'
I have modified the code to address this error as follows:
1618 if output_sample_statistics == False: 1619 return self.learner_.predict_dist(X, n_forecasts, parallel, output_sample_statistics).cpu().numpy() 1620 elif output_sample_statistics == True: 1621 return self.learner_.predict_dist(X, n_forecasts, parallel, output_sample_statistics)
This is a temporary fix, but I would appreciate it if you implement a fundamental fix.
Thank you.
Ah, good point. I'll fix that, should be an issue fix.
Fixed with 1.8.0
Hi I got the following error when using predict_dist, PGBMRegressor:
pgbm\pgbm.py:1618, in PGBMRegressor.predict_dist(self, X, n_forecasts, parallel, output_sample_statistics) 1615 X = checkarray(X) 1616 X = X.astype(np.float32) -> 1618 return self.learner.predict_dist(X, n_forecasts, parallel, output_sample_statistics).cpu().numpy()
AttributeError: 'tuple' object has no attribute 'cpu'
I have modified the code to address this error as follows:
This is a temporary fix, but I would appreciate it if you implement a fundamental fix.
Thank you.