Hi,
I'm continuously facing an issue during an epoch when running train_baselines.py with following arguments:
python train_baselines.py --config-name closed model=binary_dpr_nl seed=1 project=local-closed-1
It says that ZeroDivisionError occurred from model/seq2seq.py, especially when calling f1 function. Below is the error message:
File "/home/minseo/.conda/envs/RoMQA-3.7/lib/python3.7/site-packages/pytorch_lightning/overrides/base.py", line 110, in forward
return self._forward_module.validation_step(*inputs, **kwargs)
File "/home/minseo/.conda/envs/RoMQA-3.7/lib/python3.7/site-packages/wrangl/learn/supervised.py", line 196, in validation_step
metrics = self.compute_metrics(pred, gold)
File "/home/minseo/SemanticFiltering/romqa/model/seq2seq.py", line 81, in compute_metrics
m = {k: v for k, v in f1(pred, gold, ignore_empty=True).items()}
File "/home/minseo/.conda/envs/RoMQA-3.7/lib/python3.7/site-packages/wrangl/learn/metrics.py", line 78, in __call__
return {k: sum(v)/len(v) for k, v in metrics.items()}
File "/home/minseo/.conda/envs/RoMQA-3.7/lib/python3.7/site-packages/wrangl/learn/metrics.py", line 78, in <dictcomp>
return {k: sum(v)/len(v) for k, v in metrics.items()}
ZeroDivisionError: division by zero
I guess it occurs because the score evaluates to zero at some point in the train set, but I wonder why it happens. Would you check this issue? Thank you in advance.
PS: Just in case this might help explain the issue, I slightly increased the value of batch size, gpus from classify.yaml and added strategy='ddp' option to pl.Trainer.
Hi,
I'm continuously facing an issue during an epoch when running
train_baselines.pywith following arguments:It says that ZeroDivisionError occurred from
model/seq2seq.py, especially when calling f1 function. Below is the error message:I guess it occurs because the score evaluates to zero at some point in the train set, but I wonder why it happens. Would you check this issue? Thank you in advance.
PS: Just in case this might help explain the issue, I slightly increased the value of batch size, gpus from
classify.yamland added strategy='ddp' option topl.Trainer.