tf.errors.OpError and its subclasses are pickleable
The builtin BaseException class defines a generic __reduce__ method which uses the args attribute, see BaseException_reduce in Objects/exceptions.c. tf.errors.OpError keeps args empty and therefore cannot be pickled via BaseException.__reduce__. This commit fixes the issue by defining OpError.__reduce__.
Loading
Please sign in to comment