How to compute a squad metric? #10997
-
Hallo, |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
I'd suggest accessing the dataloader/dataset isn't a reliable solution, but rather you can return the original text and offests in Dataset.getitem or you can store the offests and text in the state variables for easy access. Here are some examples I worked with on kaggle: Here I store them in my datamodule: https://www.kaggle.com/rohitgr/chaii-q-a-with-pytorch-lightining |
Beta Was this translation helpful? Give feedback.
I'd suggest accessing the dataloader/dataset isn't a reliable solution, but rather you can return the original text and offests in Dataset.getitem or you can store the offests and text in the state variables for easy access.
Here are some examples I worked with on kaggle:
For the first one where you return the offests/text: https://www.kaggle.com/rohitgr/roberta-with-pytorch-lightning-train-test-lb-0-710
This one uses an old version of lightning, but should still be relevant I guess.
Here I store them in my datamodule: https://www.kaggle.com/rohitgr/chaii-q-a-with-pytorch-lightining
this one is recent so should be working.