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

regex filter strips whitespace #2371

Open
jkamalu opened this issue Oct 1, 2024 · 0 comments
Open

regex filter strips whitespace #2371

jkamalu opened this issue Oct 1, 2024 · 0 comments

Comments

@jkamalu
Copy link

jkamalu commented Oct 1, 2024

Hello, thank you for maintaining this project! Super valuable. Wanted to make one small issue.

The "regex" filter removes whitespace from the response, which is unnecessary. It should be up to the user to provide a regex that includes or removes whitespace. Alternatively, if the user wants to remove whitespace, they can just use the "remove_whitespace" filter on top of the "regex" filter, but as it stands, it's impossible to use the regex filter and maintain the leading whitespace, which is important for code generation tasks like humaneval, which, because it's Python, needs the leading whitespace.

@thnkinbtfly @haileyschoelkopf -- tagging you both because you're on the blame for this line

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