autoprompt icon indicating copy to clipboard operation
autoprompt copied to clipboard

How to run the code

Open lx970414 opened this issue 2 years ago • 3 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!

lx970414 avatar Apr 22 '22 10:04 lx970414

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

taylorshin avatar Apr 22 '22 16:04 taylorshin

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. ❤️

SupritYoung avatar May 10 '22 09:05 SupritYoung

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

yunimya avatar Aug 01 '23 03:08 yunimya