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

UnboundLocalError #2

Open
Yukino-3 opened this issue Apr 29, 2022 · 1 comment
Open

UnboundLocalError #2

Yukino-3 opened this issue Apr 29, 2022 · 1 comment

Comments

@Yukino-3
Copy link

Hi, thanks for your code sharing. I meet an error during the inference.
Traceback (most recent call last):
File "main.py", line 87, in
main()
File "main.py", line 84, in main
test(args, config)
File "~/Pycharmproject/SERIL/evaluation.py", line 151, in test
results[i][0, Ti] = score[i]
UnboundLocalError: local variable 'results' referenced before assignment

Does anyone know how to fix that?

@ChangLee0903
Copy link
Owner

Hi @Yukino-3 ,

Sorry for my late replying.
While your set your testing noisy dataset properly, the task_num variable will not be zero, and hence the model_list will not be a null list. To this end, the UnboundLocalError issue might be solved.
image
Seems that you did not set your path of testing noisy dataset properly.

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