Make @non_differentiable not use ::Tuple#653
Make @non_differentiable not use ::Tuple#653MasonProtter wants to merge 3 commits intoJuliaDiff:mainfrom
@non_differentiable not use ::Tuple#653Conversation
|
Why does duplicating prevent ambiguities? |
|
so first I tried without the duplication, and just putting in a |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #653 +/- ##
=======================================
Coverage 93.79% 93.79%
=======================================
Files 14 14
Lines 886 886
=======================================
Hits 831 831
Misses 55 55 ☔ View full report in Codecov by Sentry. |
@scalar_rule use ::Tuple@non_differentiable not use ::Tuple
|
We needed that for #651 |
|
Ah I see, I guess that's what created this ambiguity problem in the first place. :( |
|
I would have naively thought though that it'd be better to have |
Yes, unfortunately julia does not have a way of saying "This method always loses ambiguity fights" |
|
Having the Or maybe we should just solve this by dealing with the rules for We currently do @non_differentiable one(::Any)
@non_differentiable zero(::Any)and @scalar_rule one(x) ZeroTangent()
@scalar_rule zero(x) ZeroTangent()Maybe we should just be manually writing the rules for these functions to instead do if x <: Number
ZeroTangent()
else
NoTangent()
end? |
We are not. I think maybe we should just delete: |
|
closing in favor of JuliaDiff/ChainRules.jl#770 |
Hoping to fix JuliaDiff/ChainRules.jl#769