Skip to content

feat: SymbolicUtils v4 compatibility (release-v1 backport)#161

Open
MilesCranmerBot wants to merge 18 commits intoSymbolicML:release-v1from
MilesCranmerBot:backport/symbolicutils-v4-release-v1
Open

feat: SymbolicUtils v4 compatibility (release-v1 backport)#161
MilesCranmerBot wants to merge 18 commits intoSymbolicML:release-v1from
MilesCranmerBot:backport/symbolicutils-v4-release-v1

Conversation

@MilesCranmerBot
Copy link
Contributor

@MilesCranmerBot MilesCranmerBot commented Feb 14, 2026

Backport of SymbolicUtils v4 support onto release-v1.

Includes:

  • Update DynamicExpressionsSymbolicUtilsExt for SymbolicUtils v4.
  • Update tests for v4 behavior.
  • Fix brittle round-trip test to be order-insensitive under commutative re-ordering (compare via evaluation).

Local check (Julia 1.10.5, fresh depot): Pkg.test() passed.

@coveralls
Copy link

coveralls commented Feb 15, 2026

Pull Request Test Coverage Report for Build 22120491282

Details

  • 131 of 145 (90.34%) changed or added relevant lines in 8 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall first build on backport/symbolicutils-v4-release-v1 at 97.229%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/ValueInterface.jl 17 19 89.47%
ext/DynamicExpressionsSymbolicUtilsExt.jl 56 68 82.35%
Totals Coverage Status
Change from base Build 22021935657: 97.2%
Covered Lines: 2632
Relevant Lines: 2707

💛 - Coveralls

Restore index_functions round-trip for custom operators under SymbolicUtils v4.
@MilesCranmerBot MilesCranmerBot force-pushed the backport/symbolicutils-v4-release-v1 branch from 7152b02 to 1a8493a Compare February 15, 2026 13:42
@MilesCranmer
Copy link
Member

@codex review

@MilesCranmerBot
Copy link
Contributor Author

Swapped test/test_symbolic_utils.jl over to evaluation-based checks (mirrors what we do on master) so we’re not relying on string(eqn)/occursin anymore.

Pushed to the PR branch: 50179f3 (MilesCranmerBot@50179f31).

Adds SymbolicUtils.term() usage to prevent SUv4 from canonicalizing
x*x to x^2 during conversion. This makes the backport behaviorally
equivalent to upstream/master.

- Import term from SymbolicUtils
- Use term(op, ...) for * and + in parse_tree_to_eqs
- Use term(*, ...) in multiply_powers to build explicit products
- Restore test to check x1*x1 stays as explicit multiplication
JET flagged "local variable  may be undefined" in src/precompile.jl when iterating over a Vector of types.\n\nUse a tuple for the type loop and initialize  so the value is always defined.
Switch the chainrules NaN-mode regression to call unary test operators through  instead of explicit Node constructor, while keeping the test resilient to runtime method-extension timing on Julia 1.12. Also add explicit Node-type sanity checks before gradient evaluation.
Restore the original  structure (no helper, no explicit Node construction) but wrap the calls in  to avoid world-age issues when  installs methods during the same  thunk on Julia 1.12.
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.

3 participants