JuliaSymbolics / SymbolicUtils.jl

Symbolic expressions, rewriting and simplification
https://docs.sciml.ai/SymbolicUtils/stable/
Other
524 stars 99 forks source link

replace deprecated `similarvariable` by `similar_variable` #539

Closed ranocha closed 10 months ago

ranocha commented 11 months ago

I found this in https://github.com/ranocha/BSeries.jl/pull/153 since the CI run failed in some @test_nowarn statements with the message

┌ Warning: `similarvariable` is deprecated, use `similar_variable` instead.
│   caller = polyize(x::SymbolicUtils.BasicSymbolic{Real}, pvar2sym::Bijections.Bijection{Any, Any}, sym2term::Dict{SymbolicUtils.BasicSymbolic, Any}, vtype::Type, pow::Function, Fs::Type, recurse::Bool) at polyform.jl:149
└ @ SymbolicUtils ~/.julia/packages/SymbolicUtils/Oyu8Z/src/polyform.jl:149
Symbolic coefficients: Test Failed at /cache/build/default-amdci5-2/julialang/julia-release-1-dot-9/usr/share/julia/stdlib/v1.9/Test/src/Test.jl:863
github-actions[bot] commented 11 months ago

Benchmark Results

master 7b3e17b5fffa94... t[master]/t[7b3e17b5fffa94...]
overhead/acrule/a+2 1.23 ± 0.28 μs 1.18 ± 0.28 μs 1.04
overhead/acrule/a+2+b 1.21 ± 0.28 μs 1.17 ± 0.28 μs 1.03
overhead/acrule/a+b 0.426 ± 0.011 μs 0.417 ± 0.011 μs 1.02
overhead/acrule/noop:Int 0.032 ± 0.0005 μs 0.0318 ± 0.0008 μs 1.01
overhead/acrule/noop:Sym 0.0556 ± 0.0082 μs 0.0543 ± 0.0084 μs 1.02
overhead/rule/noop:Int 0.0532 ± 0.0016 μs 0.0539 ± 0.002 μs 0.987
overhead/rule/noop:Sym 0.0731 ± 0.0022 μs 0.0683 ± 0.0017 μs 1.07
overhead/rule/noop:Term 0.073 ± 0.0022 μs 0.0684 ± 0.0016 μs 1.07
overhead/ruleset/noop:Int 0.196 ± 0.0032 μs 0.205 ± 0.0026 μs 0.959
overhead/ruleset/noop:Sym 0.23 ± 0.0046 μs 0.231 ± 0.0055 μs 0.996
overhead/ruleset/noop:Term 5.28 ± 0.42 μs 5.06 ± 0.33 μs 1.04
overhead/simplify/noop:Int 0.266 ± 0.013 μs 0.264 ± 0.01 μs 1.01
overhead/simplify/noop:Sym 0.285 ± 0.0041 μs 0.291 ± 0.0044 μs 0.979
overhead/simplify/noop:Term 0.052 ± 0.0037 ms 0.0535 ± 0.004 ms 0.972
overhead/simplify/randterm (+, *):serial 0.144 ± 0.0025 s 0.143 ± 0.0024 s 1
overhead/simplify/randterm (+, *):thread 0.0957 ± 0.015 s 0.0956 ± 0.017 s 1
overhead/simplify/randterm (/, *):serial 0.318 ± 0.0096 ms 0.329 ± 0.011 ms 0.968
overhead/simplify/randterm (/, *):thread 0.365 ± 0.013 ms 0.375 ± 0.012 ms 0.973
overhead/substitute/a 0.0858 ± 0.0023 ms 0.0857 ± 0.0018 ms 1
overhead/substitute/a,b 0.075 ± 0.0023 ms 0.0743 ± 0.0017 ms 1.01
overhead/substitute/a,b,c 26.6 ± 0.7 μs 25.6 ± 0.7 μs 1.04
polyform/easy_iszero 0.0451 ± 0.0034 ms 0.0454 ± 0.0034 ms 0.993
polyform/isone 3.7 ± 0.1 ns 4.1 ± 0.1 ns 0.902
polyform/iszero 1.88 ± 0.037 ms 1.87 ± 0.035 ms 1.01
polyform/simplify_fractions 2.65 ± 0.041 ms 2.6 ± 0.037 ms 1.02
time_to_load 6.54 ± 0.12 s 6.44 ± 0.056 s 1.02

Benchmark Plots

A plot of the benchmark results have been uploaded as an artifact to the workflow run for this PR. Go to "Actions"->"Benchmark a pull request"->[the most recent run]->"Artifacts" (at the bottom).

shashi commented 11 months ago

Thanks!

ranocha commented 10 months ago

Bump. Any chance to merge this and release a new version?

shashi commented 10 months ago

It really sad that the tests are failing because of SpecialFunctions :(

ranocha commented 10 months ago

Thanks! Would you mind tagging a new release?