Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

KeyError: 'threshold' #4

Open
N0Carrot opened this issue Feb 1, 2024 · 1 comment
Open

KeyError: 'threshold' #4

N0Carrot opened this issue Feb 1, 2024 · 1 comment

Comments

@N0Carrot
Copy link

N0Carrot commented Feb 1, 2024

Running as:
python GEIA-main/baseline/projection.py --model_dir /gpt2-large --num_epochs 1 --batch_size 2 --dataset abcd --embed_model sent_t5 --model_type NN

File "GEIA-main/baseline/projection.py", line 425, in eval_label
threshold = config['threshold']
KeyError: 'threshold'

@teapotliid
Copy link
Collaborator

Running as: python GEIA-main/baseline/projection.py --model_dir /gpt2-large --num_epochs 1 --batch_size 2 --dataset abcd --embed_model sent_t5 --model_type NN

File "GEIA-main/baseline/projection.py", line 425, in eval_label threshold = config['threshold'] KeyError: 'threshold'

Hi Carrot,

The 'threshold' refers to the decision boundary for NNs. You can set it manually:
config['threshold'] = 0.3

Previously, we used a for loop for 'threshold' from 0 to 1 with a gap of 0.05 and deleted the code. Sorry for the mistake caused.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants