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

DecodingTrust/src/dt/perspectives/fairness/fairness_evaluation.py #54

Open
dongjiancheng77 opened this issue Jun 11, 2024 · 0 comments
Open

Comments

@dongjiancheng77
Copy link

Describe the bug
The return value of model.do classification does not match
acc, unknown, (cost, prompt_tokens, cont_tokens), cache = model.do_classification(dataset, task_message=task_dic[args.fairness.dataset], example_prefix=False, dry_run=args.dry_run)

except Exception as e:
    print(e)
    if len(cache) == 0:
        return None, None, 0, [], []
    else:
        **return acc / len(cache), unknown, cost, cache, predictions

return acc / len(dataset), unknown, cost, cache, predictions**

To Reproduce
config.yaml as fellow:
model_config:
model: "/home/nfs03/dongjc/model/Llama-2-7b-chat-hf"
type: CHAT
conv_template: "llama-2"

model_loader: HF
torch_dtype: FLOAT16
quant_file: null
tokenizer_name: "/home/nfs03/dongjc/model/Llama-2-7b-chat-hf"
trust_remote_code: true
use_auth_token: true

key: null
dry_run: false

hydra:
job:
chdir: false

callbacks:
save_job_info:
target: hydra.experimental.callbacks.PickleJobInfoCallback

dt-run ++dry_run=True +fairness=zero_shot_br_0.0.yaml

Expected behavior

DecodingTrust/src/dt/perspectives/fairness/fairness_evaluation.py", line 29, in main
acc, unknown, (cost, prompt_tokens, cont_tokens), cache = model.do_classification(dataset, task_message=task_dic[args.fairness.dataset], example_prefix=False, dry_run=args.dry_run)
TypeError: cannot unpack non-iterable int object

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

1 participant