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

RACE dataset error? #835

Open
RanchiZhao opened this issue Sep 6, 2023 · 4 comments
Open

RACE dataset error? #835

RanchiZhao opened this issue Sep 6, 2023 · 4 comments
Assignees
Labels
bug Something isn't working.

Comments

@RanchiZhao
Copy link

I am not sure that in your lm_eval/tasks/race.py
is this function an error?

        text = "Article: " + doc["article"] + "\n\n"
        for problem in doc["problems"][:-1]:
            if problem["question"][-6:] == "  _  .":
                text += (
                    problem["question"][-5:] + self.get_answer_option(problem) + "\n"
                )
            else:
                question = "Question: " + problem["question"] + "\n"
                answer = "Answer: " + self.get_answer_option(problem) + "\n"
                text += question + answer
        text += self.last_problem(doc)["question"]
        return text
text += (problem["question"][-5:] + self.get_answer_option(problem) + "\n")

should be like

text += (problem["question"][:-5] + self.get_answer_option(problem) + "\n")

to get the whole text

@RanchiZhao
Copy link
Author

[:-6] maybe is better

@StellaAthena
Copy link
Member

I think text += problem["question"][:-5] is correct. Thanks for catching this, can you open a PR with the change? In the PR, please add some examples showing how it improves formatting.

@RanchiZhao
Copy link
Author

oh yeah, i will do this soon

@StellaAthena StellaAthena added the bug Something isn't working. label Oct 19, 2023
@StellaAthena
Copy link
Member

@RanchiZhao Hey, just wanted to check in and find out if this was on the horizon still.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working.
Projects
None yet
Development

No branches or pull requests

2 participants