mirror of
https://github.com/SheffieldML/GPy.git
synced 2026-05-09 12:02:38 +02:00
pickling and caching
This commit is contained in:
parent
60a071f18f
commit
f3b74fa85f
28 changed files with 481 additions and 686 deletions
|
|
@ -97,6 +97,15 @@ class Cacher(object):
|
|||
self.cached_outputs = []
|
||||
self.inputs_changed = []
|
||||
|
||||
def __deepcopy__(self, memo=None):
|
||||
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))
|
||||
|
||||
def __setstate__(self, memo=None):
|
||||
raise NotImplementedError, "Trying to pickle Cacher object with function {}, pickling functions not possible.".format(str(self.operation))
|
||||
|
||||
@property
|
||||
def __name__(self):
|
||||
return self.operation.__name__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue