EasyNLP icon indicating copy to clipboard operation
EasyNLP copied to clipboard

CP-Tuning- model predicted same labels as ground truth label during evaluate and predict mode

Open Soumyajain29 opened this issue 1 year ago • 2 comments

Screenshot 2022-08-11 at 9 07 19 PM

I was trying to run CP tuning code. Code was working fine in training mode. But at inference time (during evaluate and test mode), getting almost 100% accuracy on multiple datasets. The pred.csv file that model saves after evaluation also contains same predicted labels as ground truth labels. However this is not the case when model is evaluated on validation set during training time. Attached the screenshot of the same. I'm unable to figure out where things are getting wrong in the code. Please look into this issue.

This is the script I'm using-

easynlp \
    --app_name=text_classify \
    --mode=evaluate \
    --worker_count=${WORKER_COUNT} \
    --worker_gpu=${WORKER_GPU} \
    --tables=./fewshot_dev.tsv \
    --outputs=pred.tsv \
    --output_schema=predictions \
    --input_schema=sid:str:1,sent1:str:1,sent2:str:1,label:str:1 \
    --worker_count=1 \
    --worker_gpu=1 \
    --first_sequence=sent1 \
    --second_sequence=sent2 \
    --label_name=label \
    --append_cols=sid,label \
    --label_enumerate_values=0,1 \
    --checkpoint_dir=./fewshot_model/ \
    --micro_batch_size=8 \
    --sequence_length=512 \
    --user_defined_parameters="
        enable_fewshot=True
        type=cpt_fewshot
        pattern=sent1,label,with,sent2,summarize
    "

Soumyajain29 avatar Aug 11 '22 15:08 Soumyajain29

pls look into this issue @ztl-35

chywang avatar Aug 12 '22 06:08 chywang

any update on this? @ztl-35 @chywang

Soumyajain29 avatar Aug 13 '22 05:08 Soumyajain29