-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
dstc7_aug data does not work for cross encoder training #7
Comments
Sorry I don't get it. What do you mean by all positive? |
Thanks for your reply. I just run your code on cross mode and it does not work because the loss is always 0. Then I print the data sampled from your DataLoader, It shows that all samples are positive samples. I suggest a contrastive loss between positive and negative samples should be considered. Thanks for you work. |
Really? I ran the code again, and it seems correct. The loss is not 0, and I did see labels contain something like [1,0,0,0,0]. What did you see in the data, for example, dstc7/train.txt? It should be something like ln1:1\tTEXT ln2:0\tTEXT.... The dataset.py basically loads this file and parse it into several training instances, where each instance contains a positive sample and 15 negative samples. |
Thanks. I download the dstc7_aug dataset and parse it instead of the dstc7 dataset. I think there is something different between the two dataset. |
Did you use the parsing code I put in the dstc7_aug folder? Also follow the instructions in readme. |
thanks!I follow the instructions and the loss is the same 0. I copy the train.txt: |
Maybe the official annotation format has been changed? Can you try it again, thank you very much. |
No, that is my fault. Thanks for pointing this out! So here is the reason: The dstc7_aug data is downloaded from the Parlai library, where they used it for bi/poly encoders training. This works fine for them since they "recycle" the other training instances in one batch for negative samples. However, this does not work with cross encoder setting as it needs separate negative samples. I fail to mention this in readme. I will add a line on readme stating that dstc7_aug cannot be used for cross encoder training. However, if you really want to train on it, you can sample some negative candidates for each context and add them to the file. Specifically, read the data format in dstc7/ to get the idea. That being said, I strongly discourage you to do so, because cross encoder training already takes super long time on the original dstc7 dataset, let alone the augmented one. |
Fine. Thanks for your quick reply. :) |
All input samples are positive, the training is meaningless.
The text was updated successfully, but these errors were encountered: