Retire legacy code in torchtext
❓ Questions and Help
As the maintainer of the torchtext library, we plan to retire torchtext.data.batch.Batch and torchtext.data.example.Example in the next release (by the end of October). Those two components will be still available in torchtext.legacy. To handle the compatibility issue, should we send a PR and fix this on GitHub first, or we could just make some changes in fbcode?
Here are the proposed changes:
# old API
from torchtext.data.batch import Batch
from torchtext.data.example import Example

# new API
from torchtext.legacy.data.batch import Batch
from torchtext.legacy.data.example import Example

Relevant issue: pytorch/text#985