Hacktoberfest 2026:維護者為十月標記出來的 issue,仍然開放、適合新手。 瀏覽 Hacktoberfest issue

Differentiable Optimization API

未關閉
#2,969 2 則留言 1 個 reaction 已指派 0 人 在 GitHub 檢視

維護者通常 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?

  1. Attributes to pass input forward and reverse sensitivities.
    1. forward inputs sensitivities: are numbers associated with the coefficients of the problem or parameters
    2. reverse inputs sensitivities: are numbers associated with variables
  2. functions to perform the diff (analogous to optimize!)
  3. Attributes to query output forward and reverse sensitivities.
    1. forward outputs sensitivities: are numbers associated with variables
    2. 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:

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 天 10 分鐘
30 天內合併 PR
12

環境準備

這個專案沒有提供開發容器、Dockerfile 或貢獻指南,環境需要你自己搭建:先看它的 README,通用步驟見我們的新手貢獻指南。

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

jump-dev/MathOptInterface.jl 的其他 Issue

查看 jump-dev/MathOptInterface.jl 的全部 Issue

相似的 Issue

更多 Julia Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。