diff --git a/beat/backend/python/data_loaders.py b/beat/backend/python/data_loaders.py index 7c034dd875cfe42af1bb4c8092928d47ad650ba4..429a26d4f29254b61d697f8f3aad8db8a0f37344 100644 --- a/beat/backend/python/data_loaders.py +++ b/beat/backend/python/data_loaders.py @@ -310,6 +310,17 @@ class DataLoader(object): return (result, indices[0], indices[1]) + def __getstate__(self): + state = self.__dict__.copy() + + # reset the data cached as its content is not pickable + for infos in state["infos"].values(): + infos["data"] = None + infos["start_index"] = -1 + infos["end_index"] = -1 + + return state + # ----------------------------------------------------------