ucinlp / autoprompt

AutoPrompt: Automatic Prompt Construction for Masked Language Models.
Apache License 2.0
594 stars 81 forks source link

Two arguments missed in label_search.py #37

Closed Zjh-819 closed 2 years ago

Zjh-819 commented 2 years ago

Hello: The first one is at line 70, config is not passed to utils.TriggerTemplatizer.init():

    templatizer = utils.TriggerTemplatizer(
        args.template,
        tokenizer,
        label_map=label_map,
        label_field=args.label_field,
        add_special_tokens=False
    )

The second one is at line 96, use_ctx is required:

train_dataset = utils.load_trigger_dataset(args.train, templatizer)

Regards.

rloganiv commented 2 years ago

Thanks for catching this!