You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I try to deep copy or pickle a binary classification model implementing the EP() inference method (from the GPy.inference.latent_function_inference.expectation_propagation module), I get the following error:
File "[...]/site-packages/GPy/inference/latent_function_inference/expectation_propagation.py", line 238, in __getstate__
return [super(EPBase, self).__getstate__() , [self.epsilon, self.eta, self.delta]]
AttributeError: 'super' object has no attribute '__getstate__'
I believe the issue is that the parent class EPBase only inherits the basic object class. Calling super(EPBase, self).__getstate__() will fail because the object class does not implement this method. In fact, some other method calls with super() in the EPBase class should also fail (such as super(EPBase, self).__setstate__(state[0]) and super(EPBase, self)._save_to_input_dict()).
As a fix, I think these super() method calls can simply be removed in the EPBase class.
The text was updated successfully, but these errors were encountered:
Problem
When I try to deep copy or pickle a binary classification model implementing the
EP()
inference method (from theGPy.inference.latent_function_inference.expectation_propagation
module), I get the following error:Reproducible example
Ran with Python 3.9 and GPy version 1.13.1:
Suggested fix
I believe the issue is that the parent class
EPBase
only inherits the basicobject
class. Callingsuper(EPBase, self).__getstate__()
will fail because theobject
class does not implement this method. In fact, some other method calls withsuper()
in theEPBase
class should also fail (such assuper(EPBase, self).__setstate__(state[0])
andsuper(EPBase, self)._save_to_input_dict()
).As a fix, I think these
super()
method calls can simply be removed in theEPBase
class.The text was updated successfully, but these errors were encountered: