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

Question: how / when to use proxy inequalities? #70

Open
famura opened this issue Feb 9, 2023 · 1 comment
Open

Question: how / when to use proxy inequalities? #70

famura opened this issue Feb 9, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@famura
Copy link

famura commented Feb 9, 2023

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.

@famura famura added the enhancement New feature or request label Feb 9, 2023
@GodeWithWind
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants