Skip to content

Update AbstractNeuralNetworks requirement from 0.6 to 0.6, 0.8 - #42

Closed
dependabot[bot] wants to merge 1 commit into
mainfrom
dependabot/julia/AbstractNeuralNetworks-0.6-and-0.8
Closed

dependabot[bot] wants to merge 1 commit into
mainfrom
dependabot/julia/AbstractNeuralNetworks-0.6-and-0.8

Conversation

@dependabot

@dependabot dependabot Bot commented on behalf of github Sep 27, 2026 •

Copy link
Copy Markdown
Contributor

Updates the requirements on AbstractNeuralNetworks to permit the latest version.

Release notes

Sourced from AbstractNeuralNetworks's releases.

v0.8.0

AbstractNeuralNetworks v0.8.0

Diff since v0.7.2

Breaking, on two counts: a rename and a narrowing.

ArrayNamedTuple is NamedTupleOfArrays

The name now says what the alias is about, which here is a network's inputs and outputs. GeometricOptimizers had an ArrayNamedTuple of parameters, and the two shared a name by coincidence rather than by meaning. That one is gone as of GeometricOptimizers 0.7.0, so this is the only alias of the shape left in the ecosystem — which is what it should have been from the start.

ArrayTuple is TupleOfArrays. ArrayOrNamedTuple keeps its name.

A whole set of parameters is a NetworkParameters

NeuralNetworkParameters 0.3.0 removes ParameterSet, the Union{NetworkParameters, NamedTuple} these signatures were written on: a method on it was a method on Base.NamedTuple, and it named two questions at once — a whole set, and a branch of one.

applychain, _compute_loss, _statify, update!(::Model, …) and changebackend take a NetworkParameters. A caller holding a bare NamedTuple writes NetworkParameters(ps), which shares the leaf arrays rather than copying them. initialparameters already returns one, so a network built here is unaffected.

Two places keep a NamedTuple signature, and neither is for breadth

  • applychain(layers, x, ps::NamedTuple), because a reverse pass calls it that way. NeuralNetworkParameters' ZygoteRules.pullback for a container seeds the pass with the wrapped NamedTuple, since that is what yields a tangent keyed by the layers rather than a tangent for the wrapper's one field. test/custom_pullback_test.jl fails without this method.
  • changebackend(backend, ::NamedTuple), because moving a single layer between backends is something a caller legitimately asks for, and a layer is a branch rather than a set.

Both are separate methods rather than one signature over a union: they answer different questions that happen to share a body.

The loss functors take ps untyped

_compute_loss and the NetworkLoss/FeedForwardLoss functors drop the annotation instead of naming both shapes, and the difference from applychain is deliberate. applychain's two methods normalise — they name the two shapes values is defined on before handing a Tuple to the @generated method that does the work. The loss functors forward ps untouched to model(input, ps) and read nothing of it.

What that costs: a wrong ps now fails inside model(input, ps) rather than at the call.

Requires

NeuralNetworkParameters 0.3.0.

Merged pull requests:

  • Rename ArrayNamedTuple, and take NetworkParameters for a set of parameters (#38) (@​michakraus)
Changelog

Sourced from AbstractNeuralNetworks's changelog.

[0.8.0] — 2026-08-29

A whole set of parameters is a NetworkParameters. NeuralNetworkParameters 0.3.0 removes ParameterSet, the Union{NetworkParameters, NamedTuple} these signatures were written on, because a method on it is a method on Base.NamedTuple and because it gave one name to two questions — a whole set, and a branch of one. Breaking: applychain, the NetworkLoss/FeedForwardLoss functors, _compute_loss, _statify, update!(::Model, …) and changebackend take NetworkParameters.

A caller holding a bare NamedTuple writes NetworkParameters(ps), which shares the leaf arrays rather than copying them. initialparameters already returns one, so a network built here is unaffected.

Two methods keep a NamedTuple signature, each for a stated reason rather than for breadth:

  • applychain(layers, x, ps::NamedTuple), because a reverse pass calls it that way. NeuralNetworkParameters' ZygoteRules.pullback for a NetworkParameters seeds the reverse pass with the wrapped NamedTuple, since that is what yields a tangent keyed by the layers rather than a tangent for the wrapper's one field. test/custom_pullback_test.jl fails without it.
  • changebackend(backend, ::NamedTuple), because moving a single layer between backends is a thing a caller legitimately asks for, and a layer is a branch rather than a set.

Both are written as separate methods rather than as one signature over a union: they answer different questions that happen to share a body, and writing them out says which shape each caller is in.

The loss functors take ps untyped rather than a method per shape, and that difference from applychain is deliberate: applychain's two methods normalise — they name the two shapes values is defined on before handing a Tuple to the @generated method that does the work — while the loss functors forward ps untouched to model(input, ps) and read nothing of it. What it costs is that a wrong ps fails inside model(input, ps) rather than at the call.

Renamed

  • ArrayNamedTuple is NamedTupleOfArrays, and ArrayTuple is TupleOfArrays. The name says what the alias is about, which here is a network's inputs and outputs; GeometricOptimizers had an ArrayNamedTuple of parameters, and the two shared a name by coincidence rather than by meaning. That one is gone as of GeometricOptimizers 0.7.0, so this is the only alias of the shape left in the ecosystem. ArrayOrNamedTuple keeps its name.
Commits
  • b1a7b47 Merge pull request #38 from JuliaGNI/rename-arraynamedtuple
  • 94a6335 Date the 0.8.0 entry and record the rename and the loss functors
  • 321aee7 Say why applychain names both shapes and the loss functors do not
  • c9f40a6 Take NetworkParameters as the type of a whole set of parameters
  • 14a94e7 Rename ArrayNamedTuple to NamedTupleOfArrays, so one name means one thing
  • 7e0cd0a Set version to 0.7.2
  • 5b942d7 Merge pull request #37 from JuliaGNI/adopt-parameterset
  • 375f4f9 Set version to 0.7.2 and take Julia 1.11
  • c628a34 Name the parameter union after the package that owns it
  • cdda062 Set version to 0.7.1
  • Additional commits viewable in compare view

@dependabot dependabot Bot added dependencies Pull requests that update a dependency file julia Pull requests that update julia code labels Sep 27, 2026
@dependabot
dependabot Bot force-pushed the dependabot/julia/AbstractNeuralNetworks-0.6-and-0.8 branch from 13d861e to d8cd8c1 Compare September 27, 2026 12:24
@michakraus

Copy link
Copy Markdown
Member

@dependabot rebase

@dependabot
dependabot Bot force-pushed the dependabot/julia/AbstractNeuralNetworks-0.6-and-0.8 branch 2 times, most recently from ea9a920 to 0ae6541 Compare September 27, 2026 16:38
Updates the requirements on [AbstractNeuralNetworks](https://github.com/JuliaGNI/AbstractNeuralNetworks.jl) to permit the latest version.
- [Release notes](https://github.com/JuliaGNI/AbstractNeuralNetworks.jl/releases)
- [Changelog](https://github.com/JuliaGNI/AbstractNeuralNetworks.jl/blob/main/CHANGELOG.md)
- [Commits](JuliaGNI/AbstractNeuralNetworks.jl@v0.6.0...v0.8.0)

---
updated-dependencies:
- dependency-name: AbstractNeuralNetworks
  dependency-version: 0.8.0
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>
@dependabot
dependabot Bot force-pushed the dependabot/julia/AbstractNeuralNetworks-0.6-and-0.8 branch from 0ae6541 to 6960839 Compare September 28, 2026 05:22
@dependabot @github

dependabot Bot commented on behalf of github Oct 11, 2026

Copy link
Copy Markdown
Contributor Author

Superseded by #55.

@dependabot dependabot Bot closed this Oct 11, 2026
@dependabot
dependabot Bot deleted the dependabot/julia/AbstractNeuralNetworks-0.6-and-0.8 branch October 11, 2026 10:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file julia Pull requests that update julia code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant