Anonymous function creation is slow, and almost always necessary
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 35/100
Hướng nghiên cứu
Start by reading the ForwardDiff method signatures that accept functions and initial values; the issue does not name specific files or tests. Check how DifferentialEquations handles call-site parameters, then determine the scope and compatibility implications of adding a similar option. Done means ForwardDiff can accept parameters at the call site without relying on a closure that captures changing state.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Suppose I have a function f(x::Vector, p::SomeData), which I want to compute the Jacobian of. A common way to do this is
p = generate_some_data()
jac = ForwardDiff(x -> f(x, p), x0)
which has very bad performance on every call because we are instantiating a new anonymous function every time, which triggers compilation. A more clever way of doing this is
partially_applied_f = x -> f(x, p)
#repeat the lines below as much as needed
p = generate_some_data()
jac = ForwardDiff(partially_applied_f, x0)
which introduces a weird invisible dependency of the calls of partially_applied_f on the current state of p. Would it be feasible to update method signatures in this package to accept parameters at the call site? Such that the following code is valid:
p = generate_some_data()
jac = ForwardDiff(f, x0, parameter = p)
DifferentialEquations already do something similar with their method calls. This would remove a lot of overhead and imprevisibility in my use cases.
- Ngôn ngữ chính
- Julia
- Star
- 1k
- Fork
- 165
- Merge trung bình
- 8 ngày 22 giờ
- Pull request đã merge (30 ngày)
- 3
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của JuliaDiff/ForwardDiff.jl
-
missing floatmin, floatmax, and issubnormal for DualCó thể đã có người làm @devmotion đã nhận 38 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
JuliaDiff/ForwardDiff.jl#852 · 6 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
`min` does not return the minimum with respect to `isless` when values tieCó thể đã có người làm @devmotion đã nhận 12 ngày trước. Đang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 55/100
JuliaDiff/ForwardDiff.jl#868 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Enable NaN-safe mode by defaultCó thể đã có người làm @devmotion đã nhận 25 ngày trước. Đang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
JuliaDiff/ForwardDiff.jl#857 · 1 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 52/100
JuliaDiff/ForwardDiff.jl#854 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 75/100
JuliaDiff/ForwardDiff.jl#849 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của JuliaDiff/ForwardDiff.jl
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Add project: Typst_jll.jlCó thể đã có người làm @github-actions đã nhận 1 ngày trước. Đang mởadd-project
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 76/100
YDX-2147483647/best-of-typst#590 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 67/100