Skip to content

Zygote DAE adjoint test errors with ChainRules PConstructorApplicator issue #1233

Description

@ChrisRackauckas-Claude

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.

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions