bigcode-project / bigcode-evaluation-harness

A framework for the evaluation of autoregressive code generation language models.
Apache License 2.0
830 stars 219 forks source link

fix apps evaluate error: local variable 'level' referenced before assignment #206

Open koking0 opened 8 months ago

koking0 commented 8 months ago

when I evaluate model on apps, meet below error:

Traceback (most recent call last):
  File "/kaggle/working/bigcode-evaluation-harness/main.py", line 412, in <module>
    main()
  File "/kaggle/working/bigcode-evaluation-harness/main.py", line 396, in main
    results[task] = evaluator.evaluate(
  File "/kaggle/working/bigcode-evaluation-harness/bigcode_eval/evaluator.py", line 107, in evaluate
    results = task.process_results(generations, references)
  File "/kaggle/working/bigcode-evaluation-harness/bigcode_eval/tasks/apps.py", line 119, in process_results
    if level is None:
UnboundLocalError: local variable 'level' referenced before assignment