Skip to content

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

@famura

Description

@famura

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions