Hello xgb community!
This is a quick python API related question: I am helping a data scientist from my team to pickle and then (in another context) un-pickle an XGBClassifier object. Un-pickling is done within a python environment where only “pip install xgboost” is run. Then an attempt to un-pickle XGBClassifier fails with
Traceback (most recent call last):
File "unpickle.py", line 13, in <module>
print(doit(sys.argv[1]))
File "unpickle.py", line 8, in doit
return pickle.load(fd)
_pickle.UnpicklingError: NEWOBJ class argument isn't a type object
Installing scikit-learn fixed the problem (yes, my colleague has it installed in his environment on the pickling side).
Should scikit-learn be an install requirement for the python pypi package? Or do I miss something?
Your help highly appreciated!
Thanks,
-Yassen