Skip to content

Conversation

@mapmeld
Copy link

@mapmeld mapmeld commented May 5, 2020

While finetuning an ELECTRA model on XLNI and a movie review task, I noticed that these tasks need to be hardcoded at finetune/task_builder.py and finetune/classification/classification_tasks.py in a less-than-straightforward way

This is an outline for how I would create a StandardTSV classifier which accepts command-line arguments for a new task which follows the same format as other finetuning tasks, with a train.tsv and dev.tsv. If this makes sense to others on the repo, I would expand it to include other task types

My proposed format for the parameter is

{"newmovies": {"type": "classification", "labels":["negative", "neutral", "positive"], "header":true, "text_column":1, "label_column":2}}

I pass this configuration to a new flag --task-config which gets merged into --hparams in the code; in the final version it could make sense to add task config as a property of hparams

Sample notebook: https://colab.research.google.com/drive/14nEiOh81z89LyNC6nZyDv7rd0L2J6tII

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant