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

[TGA] Fix TGA Compatibility with Pytorch>=1.13 #4887

Merged
merged 1 commit into from Nov 21, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion parlai/core/torch_generator_agent.py
Expand Up @@ -1596,7 +1596,7 @@ def advance(self, logprobs, step):
hyp_device = self.partial_hyps.get_device()
self.partial_hyps = torch.cat(
(
self.partial_hyps[path_selection.hypothesis_ids.long()],
self.partial_hyps[path_selection.hypothesis_ids.long().to(hyp_device)],
path_selection.token_ids.view(path_selection.token_ids.shape[0], -1).to(
hyp_device
),
Expand Down