ucinlp / autoprompt

AutoPrompt: Automatic Prompt Construction for Masked Language Models.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to run the code

lx970414 opened this issue · comments

We configured the environment and downloaded the pre-trained model when debugging the code, but there are problems when running the code, such as how to execute run.py, how to execute and generate templates in the correct order in the shell? Please also tell me the necessary components to run and the steps to run. Thank you very much!

Could you clarify the problems or errors you are running into?

For example, when you mention executing run.py are you referring to scripts/run_experiments.py in the Setup LAMA section of the README? If so, that script is located in our fork of the LAMA repo. Also note that you only need to run this script for the fact retrieval and relation extraction tasks.

The general steps for generating prompts are:

  1. Set up environment
  2. Download the data
  3. Label token selection with autoprompt/label_search.py (only for sentiment analysis and NLI)
  4. Generate prompt with autoprompt/create_trigger.py

Dear author. Do u mean that we need to run in the order of label_search.py -> create_trigger.py ? But how can i code the script to run label_search.py , I cant find the example😭. such as, how to set the argument of --label-map, --initial-trigge and --label-field ? Thank u so much. ❤️

commented

Dear author. If we have some examples,how to use label_search.py to automatically generate prompts based on examples