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

ImportError: cannot import name 'Batch' from 'torchtext.data' - pytorch 1.8 and torchtext 0.9 #6362

Closed
shrinath-suresh opened this issue Mar 5, 2021 · 2 comments · Fixed by #6365
Labels
bug Something isn't working help wanted Open to be worked on

Comments

@shrinath-suresh
Copy link

shrinath-suresh commented Mar 5, 2021

🐛 Bug

Unable to import pytorch lightning - 1.2.2 with pytorch 1.8 and torchtext 0.9.

To Reproduce

Install Pytorch 1.8 - conda install pytorch torchvision torchaudio cudatoolkit=10.2 -c pytorch
Install torchtext 0.9 - pip install torchtext
Install pytorch lightning 1.2.2 - pip install pytorch_lightning

Open python prompt and import pytorch lightning

Error log - pytorch_lightning_import_error.log attached

pytorch_lightning_import_error.log

Expected behavior

Pytorchlightning package should be imported successfully

Environment

`* CUDA:
- GPU:
- available: False
- version: 10.2

  • Packages:
    • numpy: 1.19.2
    • pyTorch_debug: False
    • pyTorch_version: 1.8.0
    • tqdm: 4.50.2
  • System:
$ pip freeze | grep light
pytorch-lightning==1.2.2

Additional context

@shrinath-suresh shrinath-suresh added bug Something isn't working help wanted Open to be worked on labels Mar 5, 2021
@Borda Borda mentioned this issue Mar 5, 2021
11 tasks
@shrinath-suresh
Copy link
Author

@Borda Thanks for the fix. When can we expect the next release (i see the PR is merged to master) ?

@ranch-hands
Copy link

hi
will you please tell me how it fixed?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Open to be worked on
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants