Repository navigation
test: drop LuxTestUtils dependency from test suite - #163
Merged
ChrisRackauckas merged 1 commit intoAug 27, 2026
Merged
Conversation
ChrisRackauckas-Claude
force-pushed
the
fix-drop-luxtestutils
branch
from
August 26, 2026 19:39
a395492 to
ee40ad6
Compare
LuxTestUtils >=1.0 unconditionally skips `using Enzyme` on prerelease Julia versions (`@static if isempty(VERSION.prerelease)`), but still references `Enzyme.ReverseMode` in a method signature, which raises `UndefVarError: Enzyme not defined` and breaks precompilation of LuxTestUtils itself on Julia prereleases such as 1.13.0-rc, failing the whole Core test group. Pinning to an older 1.x release does not help either: resolving LuxTestUtils to any version compatible with our ForwardDiff/Optimisers compat bounds still lands on a release with the same bug, or hits an unrelated Tracker/Optimisers resolution conflict. We only used `LuxTestUtils.check_approx`, so replace it with a small local implementation in `shared_testsetup.jl` and drop the dependency entirely. Co-authored-by: Cursor <cursoragent@cursor.com>
ChrisRackauckas-Claude
force-pushed
the
fix-drop-luxtestutils
branch
from
August 26, 2026 20:39
ee40ad6 to
c1c9d91
Compare
Wodlfvllf
pushed a commit
to Wodlfvllf/NeuralOperators.jl
that referenced
this pull request
Sep 1, 2026
LuxTestUtils >=1.0 unconditionally skips `using Enzyme` on prerelease Julia versions (`@static if isempty(VERSION.prerelease)`), but still references `Enzyme.ReverseMode` in a method signature, which raises `UndefVarError: Enzyme not defined` and breaks precompilation of LuxTestUtils itself on Julia prereleases such as 1.13.0-rc, failing the whole Core test group. Pinning to an older 1.x release does not help either: resolving LuxTestUtils to any version compatible with our ForwardDiff/Optimisers compat bounds still lands on a release with the same bug, or hits an unrelated Tracker/Optimisers resolution conflict. We only used `LuxTestUtils.check_approx`, so replace it with a small local implementation in `shared_testsetup.jl` and drop the dependency entirely. Co-authored-by: ChrisRackauckas-Claude <accounts@chrisrackauckas.com> Co-authored-by: Cursor <cursoragent@cursor.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
Fixes the failing
Coretest CI on prerelease Julia lanes (e.g.julia pre/ 1.13.0-rc, see failing run).Root cause:
LuxTestUtils(all1.x/2.xreleases compatible with our current compat bounds) unconditionally skipsusing Enzymeon prerelease Julia versions via@static if isempty(VERSION.prerelease)inLuxTestUtils.jl, but itsautodiff.jlstill referencesEnzyme.ReverseModein a method signature unconditionally. On a prerelease Julia (e.g.1.13.0-rc3), this raisesUndefVarError: Enzyme not defined in LuxTestUtilsand fails precompilation of the wholeLuxTestUtilspackage, which breakstest/shared_testsetup.jl(and therefore every Core testset) since it's just used there.Pinning to an older
LuxTestUtilsrelease doesn't help either: the versions old enough to predate this bug (<=1.7.2) can't resolve alongside our currentForwardDiff/Optimiserscompat bounds without hitting an unrelatedTracker/Optimisersconflict.We only used
LuxTestUtils.check_approx(a small recursive approximate-equality helper forNamedTuple/Tuple/AbstractArraygradient structures), so this PR drops the dependency entirely and inlines an equivalent local implementation intest/shared_testsetup.jl.Changes
test/shared_testsetup.jl: replaceusing LuxTestUtils: check_approxwith a small localcheck_approximplementation.test/Project.toml,test/gpu/Project.toml: remove the now-unusedLuxTestUtilsdep/compat entries.Test plan
Ran the affected Core testsets locally (Julia 1.12.4, since a Julia 1.13 prerelease toolchain wasn't available in this environment to directly reproduce the CI failure) after applying this fix — all pass, including the
check_approxgradient comparisons:test/models/fno_tests.jl: Fourier Neural Operator — 14/14 passedtest/models/deeponet_tests.jl: DeepONet — 10/10 passedtest/models/nomad_tests.jl: NOMAD — 10/10 passedtest/layers/spectral_conv_tests.jl: SpectralConv — 12/12 passedtest/layers/spectral_kernel_tests.jl: SpectralKernel — 14/14 passedAlso confirmed
Pkg.resolve()/Pkg.instantiate()succeed fortest/andtest/gpu/environments withLuxTestUtilsremoved (previously, forcing an olderLuxTestUtilscompat bound produced an unsatisfiableTracker/Optimisersresolution error).