This PR adds a infer_prompt_from_dataset function that automatically infers TextLabelPrompt or ClassLabelPrompt with the correct parameters from a dataset's meta data (if available).
Also adding three tests and changed two of the examples so that they now use infer_prompt_from_dataset.
This PR adds a
infer_prompt_from_dataset
function that automatically infers TextLabelPrompt or ClassLabelPrompt with the correct parameters from a dataset's meta data (if available).Also adding three tests and changed two of the examples so that they now use
infer_prompt_from_dataset
.for extractive question answering on SQuAD 2.0
and for text classification on imdb: