You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Space characters in the objective name AND specifying a threshold leads to an error message: "AssertionError: Outcome constraint should be of form `metric_name >= x"
#2343
Closed
nemozor opened this issue
Apr 10, 2024
· 2 comments
When running the code below, I get the following error: AssertionError: Outcome constraint should be of form `metric_name >= x`, where x is a float bound and comparison operator is >= or <=.
The error message seems unrelated to the cause which I found to be the presence of space characters in the objective name.
The error can be avoided by replacing all spaces by underscores.
This error does not show when no threshold is specified.
Wow, thank you for spotting this bug! We don't typically use metrics with whitespace in the name so we never saw this -- we should either explicitly disallow this or make sure its compatible here. Let me discuss with the team which direction we want to take this and get back to you.
We'll aim to have a PR up by EOW and included in our next release :)
Hi @nemozor, sorry to be getting back to you later than I had hoped. The team went back and forth on this a while, and eventually decided the best thing to do would be barring the use of spaces in parameter (and metric) names, but only when used in AxClient where we using string parsing for constraint definitions. The PR implementing this is here: #2397
This should be available in our next Ax release, which I expect to go out this week. Thank you for your patience!
When running the code below, I get the following error:
AssertionError: Outcome constraint should be of form `metric_name >= x`, where x is a float bound and comparison operator is >= or <=.
The error message seems unrelated to the cause which I found to be the presence of space characters in the objective name.
The error can be avoided by replacing all spaces by underscores.
This error does not show when no threshold is specified.
Replacing the spaces by underscores fixes the issue:
The text was updated successfully, but these errors were encountered: