Based on the release notes 2 you are using a deprecated API, which was previously available via torchtext.legacy.data.Field. However, this PR 2 from November already removed the torchtext.legacy namespace so you might need to update your code using the migration guide 3.