shogun
shogun copied to clipboard
Pickle works with the old API not the new one
Whenever Pickle loads a saved Shogun model, it expects the model to be implemented using the old API this can be demonstrated here
I guess this is related to #4463
Could you post a minimal standalone python example on synthetic trivial data instead of the notebook? Thx
@karlnapf I have updated the link, now it's a python file using Shogun's data however you're going to have to edit the path to point to your shogun dir
thanks. that does it. (BTW standalone means no loading of files, or adjustment of paths, but one can run this straight away, but nevermind this is sufficient.)
Could you share Traceback if there is one please?
Could you share Traceback if there is one please?
@gf712 I have updated the gist
I think the offender is this hackery in swig/interfaces/SGBase.i
if isinstance(cls, str) and cls.startswith('shogun.'):
if base is object:
import shogun
return eval(cls+'()')
Simple solution would be to replace it with the create method, but not sure that works with all cases of templated objects (although machines are rarely templated)
Which templated objects are you referring to? The template type is hidden from interfaces no?
Nevermind for now, I thought this could become a problem, but not sure anymore now, as the serialization and the new api have changed the picture. I guess someone will see when trying to fix this