You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
defval_step(self, global_step: int, batch, device="cpu", encoder=None, encoder_kwargs={}):
""" Can return multiple outputs. First output need not be loss. """
...
print(rels_predicted.shape)
returnlabel_loss, pointer_loss, rels_predicted, rels_labels
This bug is because of self._set_gather_frequency(n_samples).
In case of multiple outputs, if dimension 0 of first output was 2, then gather_frequency will be set as 2 for rest of the outputs. Class variable assignment needs to be avoided here.
Also if n_chunks is different in 2 processes, all-gather gets stuck as the process with higher number of chunks keeps waiting. For this, either make num_chunks = 1 or gather the num_chunks tensor first and take the maximum.
Task = POS tagging
validation ptb_dep 3:: 0%| | 0/7 [00:00<?, ?it/s]torch.Size([1541])
torch.Size([1547])
torch.Size([1500])
torch.Size([1514])
torch.Size([1570])
torch.Size([1506])
torch.Size([1477])
torch.Size([1626])
validation ptb_dep 2:: 29%|█████████████████████████████████████████████████████████▏ | 2/7 [00:00<00:00, 30.67it/s]
gathering
validation ptb_dep 3:: 29%|█████████████████████████████████████████████████████████▏ | 2/7 [00:00<00:00, 29.47it/s]
gathering
validation ptb_dep 1:: 29%|█████████████████████████████████████████████████████████▏ | 2/7 [00:00<00:00, 28.46it/s]
gathering
validation ptb_dep 0:: 29%|█████████████████████████████████████████████████████████▏ | 2/7 [00:00<00:00, 27.57it/s]
gathering
The text was updated successfully, but these errors were encountered: