FIX hotfix for joblib#741
@@ -515,8 +515,9 @@ class MemorizedFunc(Logger):
depending from it.
In addition, when unpickling, we run the __init__
"""
- return (self.__class__, (self.func, self.store_backend, self.ignore,
- self.mmap_mode, self.compress, self._verbose))
+ return (self.__class__, (self.func, None),
+ {k: v for k, v in vars(self).items()
+ if k not in ('timestamp', 'func')})
# ------------------------------------------------------------------------
# Private interface
@@ -775,12 +776,6 @@ class Memory(Logger):
The 'local' backend is using regular filesystem operations to
manipulate data (open, mv, etc) in the backend.
- cachedir: str or None, optional
-
- .. deprecated: 0.12
- 'cachedir' has been deprecated in 0.12 and will be
- removed in 0.14. Use the 'location' parameter instead.
-
mmap_mode: {None, 'r+', 'r', 'w+', 'c'}, optional
The memmapping mode used when loading from cache
numpy arrays. See numpy.load for the meaning of the
@@ -802,14 +797,20 @@ class Memory(Logger):
backend_options: dict, optional
Contains a dictionnary of named parameters used to configure
the store backend.
+
+ cachedir: str or None, optional
+
+ .. deprecated: 0.12
+ 'cachedir' has been deprecated in 0.12 and will be
+ removed in 0.14. Use the 'location' parameter instead.
"""
# ------------------------------------------------------------------------
# Public interface
# ------------------------------------------------------------------------
- def __init__(self, location=None, backend='local', cachedir=None,
- mmap_mode=None, compress=False, verbose=1, bytes_limit=None,
- backend_options={}):
+ def __init__(self, location=None, backend='local', mmap_mode=None,
+ compress=False, verbose=1, bytes_limit=None,
+ backend_options={}, cachedir=None):
# XXX: Bad explanation of the None value of cachedir
Logger.__init__(self)
self._verbose = verbose
@@ -940,10 +941,5 @@ class Memory(Logger):
depending from it.
In addition, when unpickling, we run the __init__
"""
- # We need to remove 'joblib' from the end of cachedir
- location = (repr(self.store_backend)[:-7]
- if self.store_backend is not None else None)
- compress = self.store_backend.compress \
- if self.store_backend is not None else False
- return (self.__class__, (location, self.backend, self.mmap_mode,
- compress, self._verbose))
+ return (self.__class__, (), {k: v for k, v in vars(self).items()
+ if k != 'timestamp'})
