Summary
The AutoZygote test in test/downstream/observables_autodiff.jl (line 227, "Adjoints with DAE" testset) errors with:
Tuple field type cannot be Union{}
at ChainRules.may_bc_derivatives(::Type{Union{}}, f::ModelingToolkitBase.PConstructorApplicator{typeof(identity)}, args::Tuple{}).
Details
This affects Julia < 1.12 (where Zygote backends are used). The error occurs in ChainRules' broadcast derivatives handling when Zygote tries to differentiate through a ModelingToolkitBase.PConstructorApplicator.
This test was previously masked because the Downstream test group failed earlier at ensemble_diffeq.jl:21 (fixed in #1231). Once that was fixed, the test group now reaches the observables_autodiff.jl tests and hits this ChainRules/Zygote issue.
Workaround
The test has been marked as @test_broken in #1231.
Root Cause
This is a downstream issue in ChainRules' broadcast differentiation rules interacting with ModelingToolkitBase's PConstructorApplicator type.
Summary
The AutoZygote test in
test/downstream/observables_autodiff.jl(line 227, "Adjoints with DAE" testset) errors with:at
ChainRules.may_bc_derivatives(::Type{Union{}}, f::ModelingToolkitBase.PConstructorApplicator{typeof(identity)}, args::Tuple{}).Details
This affects Julia < 1.12 (where Zygote backends are used). The error occurs in ChainRules' broadcast derivatives handling when Zygote tries to differentiate through a
ModelingToolkitBase.PConstructorApplicator.This test was previously masked because the Downstream test group failed earlier at
ensemble_diffeq.jl:21(fixed in #1231). Once that was fixed, the test group now reaches theobservables_autodiff.jltests and hits this ChainRules/Zygote issue.Workaround
The test has been marked as
@test_brokenin #1231.Root Cause
This is a downstream issue in ChainRules' broadcast differentiation rules interacting with ModelingToolkitBase's
PConstructorApplicatortype.