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

Bug in instruction_following_eval #1847

Open
wlhgtc opened this issue Nov 16, 2023 · 4 comments
Open

Bug in instruction_following_eval #1847

wlhgtc opened this issue Nov 16, 2023 · 4 comments

Comments

@wlhgtc
Copy link

wlhgtc commented Nov 16, 2023

@lehougoogle
Thank you for your excellent work on the instruction-following ability. However, I've noticed a bug in your code.

In the build_description method within your code, specifically when handling the Instruction type RepeatPromptThenAnswer, a parameter named prompt_to_repeat is required. However, I observed that in your kwargs, this parameter is missing.

Although there is an attempt to address this issue through this line, it seems there's a mismatch in the parameter name (prompt_to_repeat should be used instead of prompt).

I managed to resolve this issue in my implementation with the following code:

if isinstance(instruction, RepeatPromptThenAnswer):
    instruction.build_description(prompt_to_repeat=record["question"])
else:
    instruction.build_description(**record["kwargs"][index])
@wlhgtc
Copy link
Author

wlhgtc commented Nov 16, 2023

And by the way: These two methods((removeprefix and removesuffix)) were introduced in Python 3.9.
Code will not work in older version.
Maybe you should declare it in the readme?

@geronimi73
Copy link

just noticed the same. it seems that the prompt_to_repeat is in the first line of prompt.
I fixed it with

if isinstance(instruction, instructions.RepeatPromptThenAnswer):
  instruction.build_description(prompt_to_repeat=inp.prompt.split("\n")[0],**inp.kwargs[index])
else:
  instruction.build_description(**inp.kwargs[index])

.. in test_instruction_following_loose() and test_instruction_following_strict()

geronimi73 added a commit to geronimi73/instruction-eval that referenced this issue Nov 21, 2023
@lehougoogle
Copy link
Contributor

Sorry. There's a stupid bug. The prompt set is wrong. Fix coming in within 12 hours.

@lehougoogle
Copy link
Contributor

Hi all,
The prompt sets are updated. It should work now!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants