can't import torchtext.legacy.data
Asked Answered
O

1

6

enter image description here

as i know, from torchtext 0.9.0, torchtext.data and torchtext.dataset are moved to torchtext.legacy

but my 0.12.0 torchtext can't import torchtext.legacy while it can import torchtext.data

I tried if it moved to torchtext.data again but I can't find any document

  • torch.version == 1.11.0
Origin answered 16/3, 2022 at 7:58 Comment(1)
In the release notes you can find: " We have removed the legacy folder in this release which provided access to legacy datasets and abstractions. For additional information, please refer to the corresponding github issue (1422) and PR (1437)"Papaw
M
5

I also faced the same problem wtih the same versions. The only thing I was able to do about it is to install previous version of torchtext:

pip install torchtext==0.6.0

Only then was I wable to import the packs.

Meatiness answered 20/4, 2022 at 20:38 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.