HowieHwong/TrustLLM

KeyError: 'res'

Closed this issue · 1 comments

tensorflow/core/platform/cpu_feature_guard.cc:210] This TensorFlow binary is optimized to use available CPU instructions in performance-critical operations.
To enable the following instructions: AVX2 FMA, in other operations, rebuild TensorFlow with the appropriate compiler flags.
Traceback (most recent call last):
File "/TrustLLM/Robustness.py", line 19, in
eval_results_advglue = eval.advglue_eval(file_process.load_json(f"""{dataset_path}AdvGLUE.json"""))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/trustllm/task/robustness.py", line 103, in advglue_eval
check_gt(item)
File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/trustllm/task/robustness.py", line 87, in check_gt
check_res = judge(item['res'], item['task'])
~~~~^^^^^^^
KeyError: 'res'

Same error