cooper-org / cooper

A general-purpose, deep learning-first library for constrained optimization in PyTorch
https://cooper.readthedocs.io/
MIT License
106 stars 10 forks source link

Off the shelf Cooper #56

Closed juan43ramirez closed 1 year ago

juan43ramirez commented 1 year ago

Addresses #55

Changes

Testing

A toy test was implemented (tests/test_simplest_pipeline.py) without a CMP or closure. This considers inequality constraints (not proxy) and a SimultaneousConstrainedOptimizer.

Extrapolation and Alternating updates without a CMP are untested. Nonetheless, if a closure is provided to their step() method, they should work.

This is NOT breaking backwards compatibility. It is an alternative way for the user to use Cooper, but creating a CMP with a closure is still supported.

Docs

The changes in this PR have not been documented. Documentation is currently lagging behind code in dev branch (#53 #29). I think that we could tackle all the issues with documentation in one go. For now, I propose to consider this PR without docs.