Skip to content
Snippets Groups Projects
Commit 5e1e99e1 authored by Tiago de Freitas Pereira's avatar Tiago de Freitas Pereira
Browse files

Patched the serialization mechenism

parent 7961dac3
No related branches found
No related tags found
1 merge request!64Dask pipelines
...@@ -140,7 +140,7 @@ class DCTBlocks(TransformerMixin, BaseEstimator): ...@@ -140,7 +140,7 @@ class DCTBlocks(TransformerMixin, BaseEstimator):
return self return self
def __getstate__(self): def __getstate__(self):
d = dict(self.__dict__) d = self.__dict__.copy()
d.pop("dct_features") d.pop("dct_features")
return d return d
......
...@@ -8,7 +8,7 @@ import bob.io.base ...@@ -8,7 +8,7 @@ import bob.io.base
import numpy import numpy
import math import math
from bob.bio.base.extractor import Extractor from bob.bio.base.extractor import Extractor
import copy
class GridGraph(Extractor): class GridGraph(Extractor):
"""Extracts Gabor jets in a grid structure [GHW12]_ using functionalities from :ref:`bob.ip.gabor <bob.ip.gabor>`. """Extracts Gabor jets in a grid structure [GHW12]_ using functionalities from :ref:`bob.ip.gabor <bob.ip.gabor>`.
...@@ -278,11 +278,12 @@ class GridGraph(Extractor): ...@@ -278,11 +278,12 @@ class GridGraph(Extractor):
pass pass
def __getstate__(self): def __getstate__(self):
d = dict(self.__dict__) d = self.__dict__.copy()
d.pop("gwt") d.pop("gwt")
d.pop("_aligned_graph") d.pop("_aligned_graph")
if "_graph" in d: if "_graph" in d:
d.pop("_graph") d.pop("_graph")
return d return d
def __setstate__(self, d): def __setstate__(self, d):
......
...@@ -281,7 +281,7 @@ class LGBPHS(TransformerMixin, BaseEstimator): ...@@ -281,7 +281,7 @@ class LGBPHS(TransformerMixin, BaseEstimator):
return _extract(X) return _extract(X)
def __getstate__(self): def __getstate__(self):
d = dict(self.__dict__) d = self.__dict__.copy()
d.pop("lbp") d.pop("lbp")
d.pop("gwt") d.pop("gwt")
return d return d
......
...@@ -347,7 +347,7 @@ class FaceCrop(Base): ...@@ -347,7 +347,7 @@ class FaceCrop(Base):
def __getstate__(self): def __getstate__(self):
d = dict(self.__dict__) d = self.__dict__.copy()
d.pop("mask_rng") d.pop("mask_rng")
d.pop("cropper") d.pop("cropper")
return d return d
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment