Integrating the Best of TF into PyTorch, for Machine Learning, Natural Language Processing, and Text Generation. This is part of the CASL project: http://casl-project.ai/
However, we may consider providing workarounds in Texar. It is also suggested to add unit tests on serialization for affected classes including the metrics class.
Description
Users may encounter the following error when trying to pickle the objects with generic types, such as Texar metrics (https://github.com/asyml/texar-pytorch/blob/master/texar/torch/evals/metrics.py), as shown in the following stack trace:
This is a known bug in Python 3.6 when pickling the genric types https://github.com/python/typing/issues/511
Workaround
The easiest way to get around this is to upgrade to 3.7, which fixes this problem here https://github.com/python/cpython/pull/6216
Action needed.
However, we may consider providing workarounds in Texar. It is also suggested to add unit tests on serialization for affected classes including the metrics class.