Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

torch version to run a demo code for FNet #61

Closed
ra312 opened this issue Jun 19, 2021 · 6 comments
Closed

torch version to run a demo code for FNet #61

ra312 opened this issue Jun 19, 2021 · 6 comments
Assignees
Labels
enhancement New feature or request

Comments

@ra312
Copy link

ra312 commented Jun 19, 2021

Hi guys! Thanks for the awesome work! I am excited to play with the code. Here is the gist
https://gist.github.com/ra312/f3c895aba6e8954985258de10e9be52f
At the first attempt, I am encountered this exception

image

I believe the right version of pytorch shold help to fix this!
These are my current dependencies

image

If someone can advise on torch version, it would save me time and be super cool!
Many thanks, Rauan.

@dnairns-arch
Copy link

I ran into the same exact issue. I deleted the min_freq from the nlp_classification.py and then I ended up with another error.

IndexError: index out of range in self

Seems to be more than one issue with the FNet code...

image

@vpj
Copy link
Member

vpj commented Jun 20, 2021

Hi,

I am sorry, I don't know why you get this error.

Vocab accepts parameter min_freq - documentation, and you have the latest version (same as documentation).

Can you try initializing torchtext.vocab.Vocab(Counter(), min_freq=1) and see if you still get this error?

@vpj
Copy link
Member

vpj commented Jun 20, 2021

Ok, great I could reproduce the error on google colab. I'll see whats going on and get back to you.

@vpj
Copy link
Member

vpj commented Jun 20, 2021

found it, looks like its a function vocab class Vocab used to take these parameters as input in older torchtext versions. Will upgrade my setup and update the code. Thanks for opening the issue.

@vpj
Copy link
Member

vpj commented Jun 20, 2021

Looks like torchtext=0.10 requires torch=1.9, can you try downgrading to torchtext=0.9 for now (which uses torch=1.8)?.

I will have to test all experiments and models before moving to torch=1.9.

Thanks

@dnairns-arch
Copy link

Downgraded the versions to torch==1.8, and torchtext==0.9.

Re-added min_freq=1 back to nlp-classification

The FNet model is now training.

I was getting my error due to the same issue, and having removed the min_freq arg.

Let me know if you need anything else! Thanks for the help! (I am not the OP so you might wait to close until he confirms fix too.)

@vpj vpj self-assigned this Jun 21, 2021
@vpj vpj added the enhancement New feature or request label Aug 12, 2021
@vpj vpj closed this as completed Jul 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants