PerformanceEstimation / PEPit

PEPit is a package enabling computer-assisted worst-case analyses of first-order optimization methods.
https://pepit.readthedocs.io/en/latest/
MIT License
76 stars 10 forks source link

Class Operators is a child of the Function class (should it be the opposite?) #86

Open GauthierGidel opened 1 year ago

GauthierGidel commented 1 year ago

Hello,

thanks for creating this awesome library! I have a comment on the [Operators] inheriting from the class function:

The way operators are created is slightly odd to me: When you declare an operator in PEPit you declare it as a child of the class function, which is a bit weird since not every operator is the gradient of a function.

I guess it is a hack to make the library work easily since it has been originally developed on functions. However, some use cases are slightly disturbing:

Maybe one way to fix that would be to reverse the legacy (function would be a child of the Class Operator). But I understand that it may require to rethink the whole architecture of the library which may be challenging.