mirror of
https://github.com/SheffieldML/GPy.git
synced 2026-05-12 05:22:38 +02:00
[pickling] pickle error
This commit is contained in:
parent
55d714f78c
commit
8d61fe632b
2 changed files with 5 additions and 19 deletions
|
|
@ -3,6 +3,7 @@
|
|||
from ..core.parameterization.observable import Observable
|
||||
import collections, weakref
|
||||
from functools import reduce
|
||||
from pickle import PickleError
|
||||
|
||||
class Cacher(object):
|
||||
def __init__(self, operation, limit=5, ignore_args=(), force_kwargs=()):
|
||||
|
|
@ -149,10 +150,10 @@ class Cacher(object):
|
|||
return Cacher(self.operation, self.limit, self.ignore_args, self.force_kwargs)
|
||||
|
||||
def __getstate__(self, memo=None):
|
||||
raise NotImplementedError("Trying to pickle Cacher object with function {}, pickling functions not possible.".format(str(self.operation)))
|
||||
raise PickleError("Trying to pickle Cacher object with function {}, pickling functions not possible.".format(str(self.operation)))
|
||||
|
||||
def __setstate__(self, memo=None):
|
||||
raise NotImplementedError("Trying to pickle Cacher object with function {}, pickling functions not possible.".format(str(self.operation)))
|
||||
raise PickleError("Trying to pickle Cacher object with function {}, pickling functions not possible.".format(str(self.operation)))
|
||||
|
||||
@property
|
||||
def __name__(self):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue