Bump Functors compat to 0.5 and fix Zygote 0.7 compatibility#125
Merged
ChrisRackauckas merged 1 commit intoSciML:mainfrom Feb 20, 2026
Merged
Conversation
Adding Functors 0.5 allows the resolver to pick Zygote 0.7 + Flux 0.16, which changes gradient backward passes to return ChainRulesCore.Tangent instead of plain tuples. This fixes the DeepBSDE solver to use array-based returns instead of tuple construction in the gradient-traced code path, and updates NNStopping to use bare @functor (from Functors.jl) instead of the deprecated Flux.@functor. Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Functorscompat from"0.4.11"to"0.4.11, 0.5"— the only dependency requiring a major compat bumpDeepBSDEsolver to avoid tuple construction in gradient-traced code paths, which breaks with Zygote 0.7 (resolved alongside Functors 0.5). Zygote 0.7 returnsChainRulesCore.Tangentinstead of plain tuples, causinggradtuple1errorsNNStoppingto use bare@functor(from Functors.jl) instead of the deprecatedFlux.@functorChanges
Functors = "0.4.11"→Functors = "0.4.11, 0.5"neural_sdenow returns full column vectors instead of(X, u)tuples;loss_n_sdeuses array indexing instead of tuple destructuringFlux.@functor NNStoppingModelArray→@functor NNStoppingModelArrayTest plan
0.833 < 0.7threshold), which is a pre-existing flaky test unrelated to these changes🤖 Generated with Claude Code