RFC: Example Rule "Gallery" to showcase CRC best practices?
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
- 25/100
- Loại issue
- Tài liệu
- Độ rõ ràng
- Cần làm rõ
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- julia
- Lĩnh vực
- documentation
Hướng nghiên cứu
Issue không nêu tên tệp, test hay điểm bắt đầu cụ thể nào. Hãy bắt đầu bằng cách xem lại các ví dụ hiện có trong tài liệu ChainRules và nguồn cảm hứng cho gallery được liên kết, sau đó làm rõ phạm vi của gallery và mô hình đóng góp. Công việc được xem là hoàn tất khi đã thống nhất cấu trúc để giới thiệu các ví dụ rrule và frule tùy chỉnh, đồng thời đưa ra quyết định về cách lựa chọn các ví dụ từ các package bên ngoài.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Following up on some Slack (#autodiff) discussion with @mzgubic, I want to float the idea of adding a CRC rule "gallery" to the ChainRules docs, inspired by analogous things in the plotting world (eg BeautifulMakie).
I think that best practices for rule authors have become a bit too complicated to sufficiently demonstrate with just one or two small examples per section in the docs, particularly with interplay between
- custom structs & their constructors
- higher order functions
- CRC Thunks, Tangent types & AD callbacks
There are many clever rule authors in the wild who post helpful examples on Github/Discourse/Slack/Zulip but this information is very disaggregated and un-searchable. If there were some way for users to submit nice but less ultra-minimal examples and/or to aggregate relevant examples of custom rrule and frule definitions in published packages (as @ToucheSir suggested) I think linking to such a "gallery" from the CR docs would speed up the learning process for rule authors.
I would be glad to help realize such a thing if it seemed feasible and people wanted it.
Less organized thoughts from Slack:
A few custom rule examples I can find in forums but which I wouldn't know how to write based on CR docs:
- Constructors of widely used
AbstractArraysubtypes likeStaticArrays,StructArrays, etc. LinearAlgebramethods of “implicit operator” types representing giant Matrices, eg from LinearMaps.jl- Iterative solver and partial decomposition methods involving the former, eg methods from IterativeSolvers.jl, KrylovKit.jl, Arpack.jl, etc, (“adjoint method” VJP rules)
- Higher order function methods defined outside Base, often versions of
maporreducewith parallelism. - Gradient accumulation into an
InplaceableThunkof a custom struct
- Ngôn ngữ chính
- Julia
- Star
- 267
- Fork
- 66
- Merge trung bình
- 1 ngày 1 giờ
- Pull request đã merge (30 ngày)
- 9
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/ChainRulesCore.jl
-
Destructuring/iterating a `Tangent` does not unthunk fields, unlike `getindex`/`getproperty`Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 28/100
JuliaDiff/ChainRulesCore.jl#712 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
variable scope of `@thunk`Có thể đã có người làm @chengchingwen đã nhận 622 ngày trước. Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 32/100
JuliaDiff/ChainRulesCore.jl#684 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
good first issue Structural Tangent
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 55/100
JuliaDiff/ChainRulesCore.jl#669 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 20/100
JuliaDiff/ChainRulesCore.jl#668 · 6 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
breaking
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 35/100
JuliaDiff/ChainRulesCore.jl#665 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của JuliaDiff/ChainRulesCore.jl
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
-
backport 1.14 GC
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
Maintainer thường phản hồi trong vòng 1 ngày
-
`binary_focal_loss` throws a `DomainError` when a negative sample has `ŷ = 1`Có thể đã có người làm @parth-patel010 đã nhận 1 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
FluxML/Flux.jl#2818 · 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 72/100
JuliaDiff/TaylorSeries.jl#445 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
control-toolbox/CTActions#139 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày