We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e857b29 commit 4a42fe1Copy full SHA for 4a42fe1
tensorflow_datasets/core/dataset_builder.py
@@ -354,10 +354,13 @@ def code_path(cls) -> Optional[epath.Path]:
354
return epath.Path(filepath)
355
356
def __getstate__(self):
357
- return self._original_state
+ # This needs to be of the same format as __dict__,
358
+ # to match with the pickling implementation of the derived classes.
359
+ return dict(_original_state=self._original_state)
360
361
def __setstate__(self, state):
- self.__init__(**state)
362
+ original_state = state["_original_state"]
363
+ self.__init__(**original_state)
364
365
@functools.cached_property
366
def canonical_version(self) -> utils.Version:
0 commit comments