cooper
cooper copied to clipboard
Question: how / when to use proxy inequalities?
Even after reading the classification tutorial, I did not fully understand when and how to use the proxy_ineq_defect
.
In my case, I am running a dynamics simulation given a set of inputs that result from a parameterized module. These parameters should be optimized such that the observations made from the (differentiable) sim suffice some criteria. These criteria could be that at all time steps the 2nd dim of the obs should be < 0.5 or that 90% of the values of the 3rd obs dim should be > 0.8. Let's say these criteria can be arbitrary.
What works so far is, that I have a function that computes the ineq_defect
passed to the CMP's state.
Using plain inequalities, I can optimize the input generator such that these criteria are met.
During this process, I run exactly one forward sim of my deterministic system.
Now, I understood your tutorial in a way that I thought if I want to have a non-differentiable criterion (e.g., the 90% one form above) I need to use the proxy_ineq_defect
.
However, when I use the same function as for the ineq_defect
(while removing that one from the CMP state), I get this error:
AttributeError: 'NoneType' object has no attribute 'mul_'
. I originates from the dual_step
method.
Any hints what I am missing?
P.S: When opening this issue, I could only choose between bug and enhancement which both don't apply here.
Indeed, after reading all the documentation I can't tell when proxy inequalitie is available, and the class ProxyLagrangianFormulation is not yet implemented, which means that proxy inequalitie is not supported for the time being, but it is curious how the graph in the example of Linear classification with rate constraints was obtained