Closed spagliarini closed 1 year ago
Hi! This component is part of the lightning-transformers project which has been archived.
It looks like this issue comes from the squad implementation, not the Trainer
.
You can fork the repository and adapt it to your needs. Sorry for the inconvenience.
Hi!
Bug description
In _run_train (trainer.py around line 1203 - see below), the sanity check does not work as expected.
Indeed, one would expect that the validation compares the predictions with the first two features only. Instead, it compares the predictions (that are now only two, since it is just the sanity check), with the whole set of features (validation set). This cause an error that makes the training impossible to continue. Thus, the assertion (see below) raises an error.
Commenting the two lines in the first picture (1203-1204) the training starts just fine, but it would be useful to be able to use the sanity check feature.
I tag below the people I work with to keep them in the loop of the solution to this bug. @ilBonez @ftesser
How to reproduce the bug
Error messages and logs
Environment
Current environment
``` #- Lightning Component: Trainer - PyTorch Lightning Version: 1.9.4 - Lightning-transformers: 0.2.5 - Lightning-utilities: 0.8.0 - Python version: 3.9.13 - OS: Windows 11 - How you installed Lightning: pip - Running environment: local ```Thank you for your help!