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

【有个奇怪的问题】如果pred = expect_answer, 按照作者给的metric计算出来的分数不等于1 #12

Open
randomtutu opened this issue Mar 22, 2024 · 1 comment

Comments

@randomtutu
Copy link

randomtutu commented Mar 22, 2024

很奇怪,我觉得是不是哪里出了问题?

expected_answer = "eat a sandwich and sit in Dolores Park on a sunny day.".lower().split()
model_response = "eat a sandwich and sit in Dolores Park on a sunny day.".lower()
score = len(set(model_response.split()).intersection(set(expected_answer))) / len(expected_answer)
print(score)

可能改成
score = len(set(model_response.split()).intersection(set(expected_answer))) / len(set(expected_answer)) ?

@horizon94
Copy link

发现了,我已经直接这么改了

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