zjunlp / EasyEdit

[ACL 2024] An Easy-to-use Knowledge Editing Framework for LLMs.
https://zjunlp.github.io/project/KnowEdit
MIT License
1.74k stars 210 forks source link

FileNotFoundError: [Errno 2] No such file or directory: './gpt2-xl_zsre_pre_edit.json' #274

Closed CaiJichang212 closed 3 months ago

CaiJichang212 commented 3 months ago

run:

DATE=2024年5月30日
EDIT_METHOD=KN
MODEL=gpt2-xl
DATA_TEST=ZsRE-test-all
DATA_TYPE=zsre
# DATA_TEST=recent_test
# DATA_TRAIN=recent_train
# DATA_TYPE=recent
NUM=1

CUDA_VISIBLE_DEVICES=1 nohup python run_knowedit_llama2.py \
    --editing_method $EDIT_METHOD \
    --hparams_dir ../hparams/$EDIT_METHOD/$MODEL \
    --data_dir ../dataset/round1_dataset/$DATA_TEST.json \
    --datatype $DATA_TYPE \
    > log/$DATE/$EDIT_METHOD-$MODEL-$DATA_TEST-$NUM.log 2>&1 &

bug:

Traceback (most recent call last): File "EasyEdit/examples/run_knowedit_llama2.py", line 208, in metrics, editedmodel, = editor.edit( File "EasyEdit/examples/../easyeditor/editors/editor.py", line 169, in edit return self.edit_requests(requests, sequential_edit, verbose, **kwargs) File "EasyEdit/examples/../easyeditor/editors/editor.py", line 270, in edit_requests all_metrics = json.load(open(kwargs['pre_file'], 'r')) FileNotFoundError: [Errno 2] No such file or directory: './gpt2-xl_zsre_pre_edit.json'

if DATA_TEST=recent_test,it will auto generate gpt2-xl_recent_pre_edit.json, DATA_TEST=ZsRE-test-all this bug are throwed?

littlefive5 commented 3 months ago

I have updated the code, please try again.