How to create my own task? #1438
Replies: 1 comment
-
If your dataset happens to follow the same format as GLUE benchmarks, you can implement the GlueTask interface: It includes a number of metadata fields that are relevant for a dataset. Here's an example from Quora Question Pair dataset where each sample is a pair of sentences and a label. gluon-nlp/src/gluonnlp/data/classification.py Lines 139 to 180 in e65cd41 Note that it returns a GlueQQP dataset object but for your custom dataset you don't have to implement it this way. gluon-nlp/src/gluonnlp/data/glue.py Line 259 in e65cd41 Dataset classes are simply list-like containers where it implements gluon-nlp/src/gluonnlp/data/dataset.py Line 84 in e65cd41 Hope it helps. |
Beta Was this translation helpful? Give feedback.
-
Hello everyone,
I am trying to use the finetune_classifier.py (https://github.com/dmlc/gluon-nlp/blob/v0.10.x/scripts/bert/finetune_classifier.py) to finetune my own defined task. I have created the training dataset, dev dataset, and testing dataset. However, looking at the command line arguments and specifically on the following:
you can specify the above task names. My question is, how can I modify or use other gluon python files to create my own defined task using the training dataset, dev dataset, and testing dataset that I have created? And then use this finetune_classifier.py to finetune bert for the task that I am implementing.
Thank you in advance for any guidance and help.
Beta Was this translation helpful? Give feedback.
All reactions