You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The main L2O repo allow for all the functionalities to be customized by a specific method. For example, consider opt_model::JuMP.Model and a function like generate_data(opt_model). Instead, we'd have generate_data(opt_model, ::AbstractL2OMethod). It is important to have sane defaults/fallbacks, so L2OLDF.LDFMethod <: L2O.PrimalMethod can fall back to a default generate_data(opt_model, ::L2O.PrimalMethod) which e.g. generates a dataset where inputs are all parameters and outputs are all primal variables. But L2ODC3 can define a generate_data(opt_model, ::L2ODC3.PrimalDC3) that for instance stores only the independent primal variables.
Here is what I'm thinking for the structure now (subject to change of course):
Main repo
This should have all the generic/shared code. In particular it should be designed such that implementing a new method is as easy as possible.
LearningToOptimize.jl-- implements some basic methods, but nothing more than penalty.LearningToOptimize.jl/lib/L2OCore.jl-- most of the generic code lives here, e.g.AbstractProxyModel,AbstractL2OMethodLearningToOptimize.jl/lib/L2OKernels.jl-- Batch evaluation of problem data #33LearningToOptimize.jl/lib/L2OData.jl-- dataset utilitiesLearningToOptimize.jl/lib/L2OModels.jl-- some common models i.e. neural network architecturesMethods
These will have specific methods. The four below should be a good start since they cover Primal, Dual, and Primal+Dual methods.
The main L2O repo allow for all the functionalities to be customized by a specific method. For example, consider
opt_model::JuMP.Modeland a function likegenerate_data(opt_model). Instead, we'd havegenerate_data(opt_model, ::AbstractL2OMethod). It is important to have sane defaults/fallbacks, soL2OLDF.LDFMethod <: L2O.PrimalMethodcan fall back to a defaultgenerate_data(opt_model, ::L2O.PrimalMethod)which e.g. generates a dataset where inputs are all parameters and outputs are all primal variables. ButL2ODC3can define agenerate_data(opt_model, ::L2ODC3.PrimalDC3)that for instance stores only the independent primal variables.