code for LabelPrompt: Effective Prompt-based Learning for Relation Classification
To set up the environment, follow these steps:
conda create -n labelprompt python=3.8
conda activate labelprompt
pip install -r requirements.txtThe dataset can be found at KnowPrompt.
To generate few-shot datasets, run the following command:
python genetate_k_shot.py --dataset retacred --data_file train.txtTo run the model, use the following command:
python main.py --gpu 0 --dataset retacred --data_path ./dataset/retacred/k-shot/8-1