I got this error: PicklingError: Can't pickle <class 'xgboost_distribution.distributions.base.Predictions'>: it's not the same object as xgboost_distribution.distributions.base.Predictions while trying to dump an instance of a class which has two different XGBDistribution models inside. Minimal, reproducible example:
As a workaround I changed returning the predicted values by the distribution to a normal tuple instead of namedtuple and then dumping and loading of a fitted model worked fine.
I got this error:
PicklingError: Can't pickle <class 'xgboost_distribution.distributions.base.Predictions'>: it's not the same object as xgboost_distribution.distributions.base.Predictions
while trying to dump an instance of a class which has two different XGBDistribution models inside. Minimal, reproducible example:As a workaround I changed returning the predicted values by the distribution to a normal
tuple
instead ofnamedtuple
and then dumping and loading of a fitted model worked fine.