`test_approx` has ambiguities
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 45/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- julia
- Lĩnh vực
- testing-qa
Hướng nghiên cứu
Bắt đầu trong src/check_result.jl, tại các phương thức test_approx quanh các dòng 33, 34, 108 và 124, sau đó xem xét lỗi được báo cáo từ src/testers.jl:195. Tái hiện việc dispatch không rõ ràng được thể hiện trong issue và làm cho trường hợp chồng lấp AbstractZero/Tangent trở nên rõ ràng. Hoàn tất khi các ví dụ được báo cáo không còn phát sinh MethodError và các bài kiểm thử hiện có vẫn vượt qua.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
julia> ChainRulesTestUtils.test_approx(Tangent{Int}(; x=1), ZeroTangent())
ERROR: MethodError: test_approx(::Tangent{Int64, NamedTuple{(:x,), Tuple{Int64}}}, ::ZeroTangent) is ambiguous. Candidates:
test_approx(x, ::AbstractZero) in ChainRulesTestUtils at /Users/me/.julia/packages/ChainRulesTestUtils/8dFTY/src/check_result.jl:34
test_approx(actual::Tangent{P, T}, expected) where {T, P} in ChainRulesTestUtils at /Users/me/.julia/packages/ChainRulesTestUtils/8dFTY/src/check_result.jl:108
Possible fix, define
test_approx(::Tangent{P, T}, ::AbstractZero) where {T, P}
Stacktrace:
That's a made-up example, the real one gave:
Error During Test at /Users/me/.julia/packages/ChainRulesTestUtils/8dFTY/src/testers.jl:195
Got exception outside of a @test
MethodError: (::ChainRulesTestUtils.var"#test_approx##kw")(::NamedTuple{(:rtol, :atol), Tuple{Float64, Float64}}, ::typeof(test_approx), ::ChainRulesCore.NoTangent, ::ChainRulesCore.Tangent{Tuple{Float64, Float64, Float64}, Tuple{Float64, Float64, Float64}}) is ambiguous. Candidates:
(var"#s103"::ChainRulesTestUtils.var"#test_approx##kw")(::Any, ::typeof(test_approx), x, y::ChainRulesCore.Tangent) in ChainRulesTestUtils at /Users/me/.julia/packages/ChainRulesTestUtils/8dFTY/src/check_result.jl:124
(var"#s102"::ChainRulesTestUtils.var"#test_approx##kw")(::Any, ::typeof(test_approx), ::ChainRulesCore.AbstractZero, x) in ChainRulesTestUtils at /Users/me/.julia/packages/ChainRulesTestUtils/8dFTY/src/check_result.jl:33
Possible fix, define
(::ChainRulesTestUtils.var"#test_approx##kw")(::Any, ::typeof(test_approx), ::ChainRulesCore.AbstractZero, ::ChainRulesCore.Tangent)
- Ngôn ngữ chính
- Julia
- Star
- 50
- Fork
- 18
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
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/ChainRulesTestUtils.jl
-
code snippet in readmeĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
JuliaDiff/ChainRulesTestUtils.jl#148 · 1 reaction ·
-
use DocThemeIndigoĐang mởdocumentation good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 45/100
-
more `test_approx` ambiguitiesĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 45/100
-
mutation
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 45/100
Tất cả issue của JuliaDiff/ChainRulesTestUtils.jl
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
oscar-system/GAP.jl#1455 ·
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 65/100
JuliaAI/MLJTransforms.jl#85 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
SciML/OrdinaryDiffEq.jl#4875 ·
Maintainer thường phản hồi trong vòng 3 ngày
-
documentation
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/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 66/100
SciML/NonlinearSolve.jl#1372 ·
Maintainer thường phản hồi trong vòng 1 ngày