Ax: Setting parameter constraints of the form x - y >= 1

Created on 9 Oct 2019  Â·  5Comments  Â·  Source: facebook/Ax

It seems like parameter restraints are very strict, so x - y >= 1 does not work. Is it possible to support this in the future or does something prevent it?

"Parameter constraint should be of form >= for order constraints or <parameter_name> + <other_parameter_name> >= x, where any number of parameters can be summed up andx` is a float bound. Acceptable comparison operators are ">=" and "<=".'

enhancement fixready

All 5 comments

Using the ParameterConstraint class,

ParameterConstraint(constraint_dict={"x": 1, "y": -1}, bound=1)

Will work. Constraints of this form cannot currently be parsed from strings expressions.

@dqii, it seems that you are using the Service or Loop APIs? For those, only addition is supported at the moment, but I will flag this as something we need to add. To use the answer Jacob provided above, you would need to use the Developer API.

Also, one solution could be simply changing your problem setup such that you convert y to -y in your evaluation procedure –– that might be the fastest way to get your constraint working for now.

Correct, I'm using the Loop API currently. Thanks for the response!

@dqii, this functionality is now available on master, check latest version for installation instructions. This will also be included in the next stable version when it comes out.

This functionality is now part of the latest stable version, 0.1.8!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

natolambert picture natolambert  Â·  4Comments

FelixNeutatz picture FelixNeutatz  Â·  4Comments

showgood163 picture showgood163  Â·  4Comments

ksanjeevan picture ksanjeevan  Â·  3Comments

dkatz23238 picture dkatz23238  Â·  5Comments