-
Notifications
You must be signed in to change notification settings - Fork 122
Closed
Description
I'm planning on making some changes and improvements, and I thought I'd write out my plan, in case there are objections and just so these changes aren't coming out of nowhere. It's hard to say how much of this I'll actually get done, but I've consistently been feeling pretty motivated on weekends to work on this, so hopefully it's not too wildly ambitious.
Ordered priorities:
- (Add benchmarks #321) Add some benchmarking. This is the first priority, because I want to make sure subsequent changes don't hurt performance. I'll probably put up a PR today or tomorrow and merge it fairly quickly, so that subsequent PRs can get benchmarked against master. This won't involve code changes to the Convex.jl
srcfolder so there should be little chance of breaking anything. - (Remove global variables #322) Get rid of global dictionary of variables (
id_to_variables). This is half the cause of Memory leak #83, and I think there's a relatively easy fix. The hard bit is to make sure to not hurt perf too much, since we will have to do the work locally in the problem instead of once at variable construction time, so benchmarking is key. - (Remove global variables #322) Get rid of the other global variable? I haven't looked into this, but it's used for dual values so it might be nice to do this before the next point. This would then close Memory leak #83.
- Switch to MOI. This is maybe 80% done in my branch https://github.com/ericphanson/Convex.jl. I still need to populate dual variables, decide what to do with the various
can_solve_sdptype methods, and clean up the code a bit (either get rid of MBP or make Convex usable with both MBP and MOI). Benchmarking is important here too, to make sure we haven't hurt model formulation speed with the new internals generating MOI functions and constraints. Ideally, we might get improvements. - Tag an MOI release! (https://github.com/JuliaOpt/Convex.jl/milestone/2)
- Formulate a coherent public API (Better public API (deprecate field access) #346,
AbstractVariableinterface; allow variables to carry constraints #358) with an aim towards 1.0
Optional:
- (Improve printing of problems, constraints, and variables #325) Add
AbstractTreesdependency + methods, so a Convex.jl problem can be seen as anAbstractTree. I thought I might need this for getting rid ofid_to_variables, but I think I won't now, so it's kind of optional. It's nice because you can useAbstractTrees.print_tree(p::Problem)to generate a nice representation of the problem. This might actually give a nicer way to show the problem in the REPL which we could use forshow. You can also use GraphPlots master and doplot(TreePlot(p))wherep::Problemand get a visual representation of the problem (which was my motivation for AddAbstractTreesplotting JuliaPlots/GraphRecipes.jl#80). The only downside is the dependency, which is 700 lines of Julia with no dependencies itself, which doesn't seem too bad. I might PR this one soon because it's already done locally. - Finish + merge
(WIP) Allow variables to carry constraints, custom variable types #313AbstractVariableinterface; allow variables to carry constraints #358. This PR touches almost every use ofVariable(if only trivially replacing it byAbstractVariable) so it will need rebasing with each of the above changes. But it's really an enhancement / feature, not blocking for MOI, and MOI is probably more important. It shouldn't have any perf consequences, but benchmarking would be nice to confirm. I see this as opening the door to DSLs based on top of Convex, and it may be better to wait for some of the big internals changes (e.g. switch to MOI) first, so that there's a stable base for those DSLs. - Partially specified problems #310: allows implementing more atoms, and make it easier to write DSLs on top of Convex. Might be able to remove some current atoms too (without feature loss).
- Cache conic forms between
solve!s? #318: seems important for makingfix!andfree!have meaningful perf advantages for model formulation. - Various doc changes and small fixes. E.g. I have some open PRs that I should rebase and double-check.
Speculative:
- Change how
conic_form!works to be closer to MOI. Theoretically, eachconic_form!could be directly generating MOI functions and constraints, instead of usingConicObj's. This would give nicely typed objects which would hopefully address performance issues like Massive RAM for moderate problem #254, and maybe others (which I haven't looked into too much). The end-state of this would be Convex being a front-end to MOI like JuMP, but with different syntax, DCP checking, and some pseudo-bridges on top. I think that's a reasonable place to be, and positions Convex well to take advantage of MOI's fast + high quality development. This would likely involve rewritingconic_form!for every atom.
ararslan, matbesancon, nickrobinson251, oxinabox, chriscoey and 3 morechriscoey
Metadata
Metadata
Assignees
Labels
No labels