Cannot import name Field from torchtext.data

from torchtext.data import Field
I am using pytorch 1.13 and torchtext 0.12.0

Version 1.13 just works quite different now. You will need to check the docs and most recent examples/tutorials.

I would argue that it became more light-weight since it focuses on the important parts, and no longer on preprocessing steps like tokenization.

In short, FIELD is gone now. And to be honest, I prefer it that way.

2 Likes

Thanks, i will check it.
do you know useful resources to start with PyTorch or books?
everything I found is with the legacy version and I am confused I am new to NLP

There is a minimal example in the docs.

I actually prepared 2 simple Jupyter notebooks for my students that I don’t mind sharing. But it would have to wait until tomorrow. It’s late here :).

1 Like

Thanks in advance.
I will be waiting for you to send them!

I’ve made 2 notebooks for download here.

At some point this will all be on GitHub but it’s far from ready and polished. I hope it’s useful.

1 Like

thanks a lot, vdw for your help

the link don’t open!

Can I also see the notebooks??
I can not open the link.
Thx again, vdw. :sweat_smile:

The link should work but I assume your browser blocks HTTP requests. I simply copied to my own virtual server; and I don’t have SSL certificates for that.

1 Like

sry, my bad.
By using Microsoft Edge, I can open and download the notebooks!!
:+1: