Skip to content

Fix default verbosity in NNODE and NNSDE - #1108

Draft
ChrisRackauckas-Claude wants to merge 1 commit into
SciML:masterfrom
ChrisRackauckas-Claude:agent/neuralpde-deverbosity-docs-fix-20260809-085744
Draft

Fix default verbosity in NNODE and NNSDE#1108
ChrisRackauckas-Claude wants to merge 1 commit into
SciML:masterfrom
ChrisRackauckas-Claude:agent/neuralpde-deverbosity-docs-fix-20260809-085744

Conversation

@ChrisRackauckas-Claude

Copy link
Copy Markdown
Member

Summary

  • handle DiffEqBase v7's DEVerbosity default in the NNODE and NNSDE optimization callbacks
  • retain iteration printing when callers explicitly pass verbose = true
  • exercise omitted verbose in the NNODE and NNSDE solver tests

Root cause

The callbacks assumed that the verbose keyword was always a Bool. DiffEqBase commit 6853462 changed the v7 solve default to DEFAULT_VERBOSE, a DEVerbosity. NeuralPDE opened DiffEqBase/OrdinaryDiffEq v7 compatibility in 5c011a7 without adapting these pre-existing callbacks, so an ordinary solve(prob, NNODE(...)) or solve(prob, NNSDE(...)) reached a non-Boolean value in if verbose.

The local progress output remains an explicit opt-in: only the literal verbose = true enables it. This matches the existing SDEPINN compatibility handling.

Issue #1105 currently records a separate numerical assertion failure in the data-collocation tutorial. This PR fixes the default-verbosity defect found during that investigation and does not close #1105.

Validation

  • reproduced the pre-fix TypeError: non-boolean (DiffEqBase.DEVerbosity...) used in boolean context in both NNODE and NNSDE with Julia 1.12.6 and DiffEqBase 7.13.0
  • rendered a normal Documenter @example containing both omitted-verbose solves on Julia 1.12.6 and Julia 1.10.11
  • passed NNSDE1/nn_sde__test_1_solve_autodiff.jl on Julia 1.12.6, 1.11.9, and 1.10.11
  • passed Runic and git diff --check
  • full NNODE/NNSDE groups and the unmodified clean full-docs build are still running locally; final results will be added in a PR comment

Ignore this PR until it has been reviewed by @ChrisRackauckas.

Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
@ChrisRackauckas-Claude

Copy link
Copy Markdown
Member Author

Local validation for 8ff0357a2834a69787b1e83a8b3ad811733c98cc is complete.

Reproduction and regression

With DiffEqBase 7.13.0, omitting verbose before the fix produced this error in both NNODE and NNSDE:

TypeError: non-boolean (DiffEqBase.DEVerbosity{true, SciMLLogging.Minimal, SciMLLogging.Minimal}) used in boolean context

The NNODE failure was at src/ode_solve.jl:470; NNSDE was at src/NN_SDE_solve.jl:904. After the fix, the same omitted-verbose, one-iteration solves completed. A normal Documenter HTML build containing both exact solve paths passed on Julia 1.10.11 and 1.12.6 with no warnonly or exception handling.

Test matrix

I ran each group independently with a six-hour shell timeout using this command shape (with the listed Julia channel, group, and isolated depot):

env GROUP=<group> JULIA_DEPOT_PATH=<depot> \
  timeout 21600 /home/crackauc/.juliaup/bin/julia +<channel> \
  --startup-file=no --color=no --project=. \
  -e 'using Pkg; Pkg.test(; julia_args = ["--startup-file=no"])'

Results:

Julia GROUP=NNODE GROUP=NNSDE1
1.10.11 pass pass
1.11.9 pass pass
1.12.6 pass pass

Every run executed the complete selected group and ended with Testing NeuralPDE tests passed. The modified NNODE scalar file passed 3/3 in every NNODE run, and the modified NNSDE autodiff file passed 3/3 in every NNSDE1 run.

Docs investigation

The unmodified full docs path on clean base bac74b6fe9dac88cc3248bb3dc730048291fb647 independently reproduced issue #1105's data-collocation assertion. That page explicitly passes verbose = true, so it does not exercise the fixed default and is a separate numerical-result failure. The exact reproduction and corrected file history are recorded in #1105 (comment).

Formatting

/home/crackauc/.julia/juliaup/julia-1.12.6+0.x64.linux.gnu/bin/julia \
  --startup-file=no \
  --project=/home/crackauc/sandbox/tmp_20260708_051717_3275/qa-artifacts/runic-julia-env \
  -e 'using Runic; exit(Runic.main(ARGS))' -- --check --diff \
  src/ode_solve.jl src/NN_SDE_solve.jl \
  test/NNODE/nnode__scalar.jl \
  test/NNSDE1/nn_sde__test_1_solve_autodiff.jl

git diff --check HEAD^ HEAD

Both commands exited 0 against the pushed commit.

@ChrisRackauckas-Claude

Copy link
Copy Markdown
Member Author

Current CI failure classification:

  • QA fails the pre-existing blanket-reexport check. That work is isolated in draft PR Enforce SciMLTesting 2.4 public API QA #1106.
  • AdaptiveLoss fails the deterministic pre-existing GradientScale assertion (0.6782495387996011 < 0.4) on Julia 1.10 and 1.11. That fix is isolated in draft PR Restore GradientScale AdaptiveLoss test capacity #1107.
  • downgrade NNPDE1 fails during dependency precompilation before the changed code is exercised: old OptimizationOptimisers cannot resolve @SciMLMessage, and old CUDA/Lux components cannot resolve APIUtils.

I am not adding these unrelated fixes to this focused default-verbosity PR. The affected NNODE/NNSDE1 jobs remain the relevant CI signal; NNODE on Julia 1.10 is already green.

@ChrisRackauckas

Copy link
Copy Markdown
Member

This should instead update to preferring the DEVerbosity / SciMLLogging.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Data-collocation inverse tutorial assertion fails on clean master

2 participants