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

typo in _strip_string? #21

Open
sieu-n opened this issue Feb 17, 2024 · 1 comment
Open

typo in _strip_string? #21

sieu-n opened this issue Feb 17, 2024 · 1 comment

Comments

@sieu-n
Copy link

sieu-n commented Feb 17, 2024

Description

There appears to be a typo in the _strip_string function of the math_equivalence.py file, where an unnecessary escape character is used with the percent sign. The code uses string.replace("\%", "") when it seems to me that string.replace("%", "") was intended. I'm not 100% certain whether this behavior is unintentional but currently is_equiv("50%", "50") == False. The current code also throws a warning for python 3.11.

string = string.replace("\%", "")

Suggestion

string = string.replace("\%", "")
->
string = string.replace("%", "")
@sieu-n
Copy link
Author

sieu-n commented Feb 17, 2024

Just did some research for 5 mins

Everything in the data should be correctly normalized since they all seem to be formatted like 50\%.

The only difference due to this is when the model predicts 50% instead of 50 or 50\% because is_equiv("50\\%", "50%") == False. There are 51 % signs in the test set(~1%), and the results are only impacted if the model acts in a certain way.

edit: typo

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