Differentiable Optimization API
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 5/5
- 预计耗时
- 一周以上
- 新手友好度
- 25/100
- Issue 类型
- 功能
- 描述清晰度
- 需要澄清
- 活跃度
- 停滞
- 技术栈
- julia
调研方向
从 DiffOpt.jl PR #344 中的初始讨论开始,并比较其中引用的 DiffOpt lpbasis、MadDiff 和 Moreau 实现。检查它们如何处理敏感性属性、微分函数、重置、参数、系数函数、惰性 getter 以及 JuMP 级别的辅助函数;由于没有指定目标文件或测试,因此完成的标准是达成一个一致的最小 API。
由索引模型根据 Issue 内容生成。
描述
What is the minimal API for differentiable optimization?
- Attributes to pass input forward and reverse sensitivities.
- forward inputs sensitivities: are numbers associated with the coefficients of the problem or parameters
- reverse inputs sensitivities: are numbers associated with variables
- functions to perform the diff (analogous to optimize!)
- Attributes to query output forward and reverse sensitivities.
- forward outputs sensitivities: are numbers associated with variables
- reverse outputs sensitivities: are numbers associated with the coefficients of the problem or parameters
Important aspects:
a. A function to reset all input sensitivities is extremely important in practice, as resetting manually is very inefficient.
b. Parameters are extremely useful here. Having used DiffOpt and talking to users it is clear that it is very error-prone to touch coefficients directly (also see: https://arxiv.org/abs/2510.25986). POI is almost essential here.
c. Passing coefficients individually is suboptimal because it does not play well with bridges. Passing coefficient sensitivities as functions is key to making it work smoothly. For getters, Lazy operations are importants as we are usually no interested in absolutely every single coefficient
d. In practice, helper methods for objective sensitivity are a lifesaver.
e. Having a JuMP level API is much more ergonomic than having MOI.set and get all around.
We already have use case for existing solvers:
- https://github.com/jump-dev/DiffOpt.jl/tree/jg/lpbasis (HiGHS, Gurobi, Xpress)
- MadNLP (https://github.com/MadNLP/MadDiff.jl/tree/main/ext/MathOptInterfaceExt)
There is a new solver that proposes to do it as well: - Moreau (https://github.com/jump-dev/DiffOpt.jl/pull/344)
Additional points:
- In DiffOpt, we did not put much effort into sensitivities associated with duals. Attribute-wise, there is nothing special here, but we never have a concrete use case, so we did not venture into it.
Initial discussion in: https://github.com/jump-dev/DiffOpt.jl/pull/344
- 主要语言
- Julia
- 星标
- 506
- 派生
- 103
- 平均合并
- 1 天 1 小时
- 30 天内合并 PR
- 9
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
jump-dev/MathOptInterface.jl 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 78/100
jump-dev/MathOptInterface.jl#3113 ·
维护者通常 1 天内回复
-
[Bridges] MultirowChange in set_map.jl drops zero coefficients可能已有人在做 @odow 于 6 天前认领。 未关闭
jump-dev/MathOptInterface.jl#3106 · 2 条评论 · 已指派 1 人 ·
维护者通常 1 天内回复
-
Precision loss in Hessian computation可能已有人在做 @blegat 于 7 天前认领。 未关闭
难度 5/5 一周以上 新手友好度 15/100
jump-dev/MathOptInterface.jl#3104 · 11 条评论 ·
维护者通常 1 天内回复
-
难度 5/5 一周以上 新手友好度 35/100
jump-dev/MathOptInterface.jl#2986 · 3 条评论 ·
维护者通常 1 天内回复
-
Type: Set Request
难度 5/5 一周以上 新手友好度 35/100
jump-dev/MathOptInterface.jl#2904 · 15 条评论 · 7 个 reaction ·
维护者通常 1 天内回复
查看 jump-dev/MathOptInterface.jl 的全部 Issue
相似的 Issue
-
难度 1/5 1 小时以内 新手友好度 83/100
JuliaMath/Polynomials.jl#647 ·
-
难度 2/5 1-3 小时 新手友好度 74/100
OpenSourceAWE/SymbolicAWEModels.jl#431 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 66/100
-
难度 2/5 1-3 小时 新手友好度 75/100
JuliaArrays/StaticArrays.jl#1365 ·
-
`@fastmath` reductions are 2–5× slower: no `neutral_element` for `Base.FastMath.max_fast` and co.未关闭
难度 2/5 1-3 小时 新手友好度 86/100
JuliaGPU/GPUArrays.jl#833 ·
维护者通常 1 天内回复