-
Notifications
You must be signed in to change notification settings - Fork 48
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
unhashable type: 'list' #24
Comments
Hi, Can you show me your completed code? |
What about the following change in the source file safety.py ?
|
Hi, Can you give me the detailed code you use? It will help us to solve your issue better. |
The code is from the Guide from trustllm import safety evaluator = safety.SafetyEval() jailbreak_data = file_process.load_json('jailbreak_data_json_path') |
Hi, There may be something wrong with your data format. We have tested the code and it's right. |
Before you add an invalid label, could you upload the file "jailbreak_data_json_path" ? I am not sure where the data format may be wrong. Thanks. |
This is a snapshot of the generated file
|
I made a pull request for the issue. I am confused that you couldn't reproduce the issue. It is very likely that the dataset (dataset/dataset.zip) in the public repository is not the dataset you used or you are using for the results in the paper. |
['fixed sentence'] <class 'list'>
File "/home/trustllm/lib/python3.9/site-packages/trustllm/task/safety.py", line 43, in jailbreak_eval
res_dict.setdefault(label, []).append(d)
TypeError: unhashable type: 'list'
The type of the "label" may cause the error.
The text was updated successfully, but these errors were encountered: