Skip to content
This repository has been archived by the owner on Nov 3, 2023. It is now read-only.

Potential Conflict Between ParlAI and PyTorch 1.13 in parlai.core.torch_generator_agent.py #4869

Closed
Guest400123064 opened this issue Nov 8, 2022 · 2 comments
Labels

Comments

@Guest400123064
Copy link

Guest400123064 commented Nov 8, 2022

Bug description
I installed ParlAI from source (v1.7.1), Fairseq (v0.12.2), and (with pip) torch (v1.13). When running from the command line parlai interactive -m bart, it complaints:

File "/home/wangy49/Projects/empathic-bot/packages/ParlAI/parlai/core/torch_generator_agent.py", line 1599, in advance self.partial_hyps[path_selection.hypothesis_ids.long()], RuntimeError: indices should be either on cpu or on the same device as the indexed tensor (cpu)

Reproduction steps
With the version specified above, run parlai interactive -m bart

Expected behavior
Expected to start an interactive session with BART.

Logs

(Some model downloading and loading logs are not shown here)

File "/home/wangy49/Projects/empathic-bot/packages/ParlAI/parlai/core/torch_generator_agent.py", line 1599, in advance self.partial_hyps[path_selection.hypothesis_ids.long()], RuntimeError: indices should be either on cpu or on the same device as the indexed tensor (cpu)

Additional context
Running the code with T4 GPU with cuda 11.6

When using torch (v1.12), the problem was resolved. First mentioned in the followups in #4031

@github-actions
Copy link

github-actions bot commented Dec 9, 2022

This issue has not had activity in 30 days. Please feel free to reopen if you have more issues. You may apply the "never-stale" tag to prevent this from happening.

@github-actions github-actions bot added the stale label Dec 9, 2022
@klshuster
Copy link
Contributor

This is resolved on latest ParlAI

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants