Skip to content
This repository has been archived by the owner on Oct 9, 2023. It is now read-only.

Commit

Permalink
Fix AL
Browse files Browse the repository at this point in the history
  • Loading branch information
ethanwharris committed Nov 30, 2021
1 parent 5a00631 commit cd66eb5
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions flash/core/data/io/input_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,14 @@ def __setstate__(self, newstate):
newstate["data"] = None
self.__dict__.update(newstate)

def __copy__(self):
"""The default copy implementation seems to use ``__getstate__`` and ``__setstate__`` so we override it
here with a custom implementation to ensure that it includes the data list."""
cls = self.__class__
result = cls.__new__(cls)
result.__dict__.update(self.__dict__)
return result

def __deepcopy__(self, memo):
"""The default deepcopy implementation seems to use ``__getstate__`` and ``__setstate__`` so we override it
here with a custom implementation to ensure that it includes the data list."""
Expand Down

0 comments on commit cd66eb5

Please sign in to comment.