-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problems with Symbolics? #88
Comments
Problem solved after some package updating. CI tests are fine now for julia 1.9 and 1.10 Edit: broken again |
More precisely, the problem seems to be in SymbolicUtils, and fixes are in progress (update shows some downgrading from 1.7.0 to 1.6.0 at the moment). |
@PierreMartinon thank you for this (had not seen it). I actually just posted an issue on |
@PierreMartinon tried to update everything but same error as yours still there. @tmigot @amontoison any clue? |
I opened a PR to drop Symbolics.jl / SparseDiffTools.jl and use SparsityTracer.jl: Can you try with this branch of ADNLPModels.jl if you have the same error? |
I quickly tried and It seems that ERROR: MethodError: no method matching (::CTBase.Dynamics{…})(::Int64, ::Vector{…}, ::SparseConnectivityTracer.GradientTracer{…}, ::Vector{…})
Closest candidates are:
(::CTBase.Dynamics{Autonomous, Fixed})(::Real, ::Union{Real, AbstractVector{<:Real}}, ::Union{Real, AbstractVector{<:Real}}, ::Union{Real, AbstractVector{<:Real}})
@ CTBase ~/.julia/packages/CTBase/xrEbg/src/functions.jl:792
(::CTBase.Dynamics{Autonomous, Fixed})(::Union{Real, AbstractVector{<:Real}}, ::Union{Real, AbstractVector{<:Real}})
@ CTBase ~/.julia/packages/CTBase/xrEbg/src/functions.jl:788 |
Hi guys! Did you manage to identify which version change introduce the bug? |
Thanks @amontoison On it, doing some checks🤞🏾@tmigot keeping you posted.
|
Hi everyone. Not sure if this helps, but in the CI tests that first failed, then passed, and now fails again, SymbolicsUtils was 1.6.0 then 1.7.0 then down to 1.6.0 again. The weird thing is that even though 1.7.0 is the latest, I only get 1.6.0 when adding the package in julia. |
@amontoison @PierreMartinon @tmigot confirming the problem persists with your branch, @amontoison (*) I suspect that the problem is that our What do you think @amontoison and @tmigot ? (*) @amontoison naive question / side note: to perform this test
add https://github.com/amontoison/ADNLPModels.jl#SCT so that the project got recompiled with that code. Correct? Another (simpler) way to check this? |
Hi again @tmigot; I do not know right now, but I can try to pin previous versions and check. Indeed, the typing of @PierreMartinon any clue?
|
Reverting to CTDirect 0.4.6 / CTBase 0.7.2, the error is still there, and those versions passed the CI tests when they were released. I really suspect this has something to do with the symbolic operations somewhere. The 1.7.0 version of SymbolicUtils that allowed the CI to pass seems to have been unregistered, maybe they are still fixing some quirks with it. With 1.6.0 we see a lot of warnings about a deprecated istree() method, as well as the aforementioned error. |
It looks like this is related JuliaSymbolics/SymbolicUtils.jl#595
|
Thanks @tmigot
Where is this dependence?
|
@jbcaillau @PierreMartinon |
@tmigot @amontoison hi there, where exactly (= in which
|
In ADNLPModels.jl we don't have a compat entry for Symbolics.jl because it's an optional dependency: @tmigot We should probably update ADNLPModels.jl to have a way to add compat entry for Symbolics.jl? |
Because, Symbolics.jl is an implicit dependency we don't have a compat for it. So, maintaining the compat for Symbolics should be on your side. Now for SymbolicsUtils, in theory, we don't need to maintain a version compat, because it is an implicit dependency. If there is a breaking release in SymbolicsUtils, then it would later mean a breaking release in Symbolics.jl and so we usually don't see the breaking changes in SymbolicsUtils.
We have the test/Project.toml as a "guideline" for the tested version, but it is not a contrained for users of the combination ADNLPModels/Symbolics. https://github.com/JuliaSmoothOptimizers/ADNLPModels.jl/blob/main/test/Project.toml @amontoison what about we temporarily add a compat entry for SymbolicUtils there? |
@tmigot @amontoison Hi guys, thank you for your input. Now I get it why I could not find a reference to [Require.jl] README says
So yes, a compat somewhere would be really nice as we are stuck to |
ADNLPModels.jl doesn't install Note that it's not an issue to add |
Solved by @tmigot and @amontoison by this patch 🙏🏽 @PierreMartinon Keeping this issue open since there is some ongoing work in SparseConnectivityTracer.jl that might offer an alternative, as suggested by @tmigot (check this issue) |
I did a meeting with Guillaume this afternoon. |
@amontoison @tmigot although the current patch runs locally, there is still package incompatibility detected by the CI in the patch-1 branch. any clue? |
|
The compat entry on Symbolics.jl is too restrictive. It should |
😅 hasty me |
This PR fixes the issue: thanks @tmigot @amontoison @PierreMartinon still, I suggest to leave the issue open as
|
Back on track, thanks a lot ! |
Feel free to ping me or open an issue if there is any missing functionality. Things are moving quickly and we released SparseConnectivityTracer |
@PierreMartinon @jbcaillau @joseph-gergaud @ocots I worked with Guillaume Dalle over the last few weeks and the PR JuliaSmoothOptimizers/ADNLPModels.jl#230 simplifies many aspects of
Next step is to improve The final goal is to use DifferentiationInterface.jl in ADNLPModels.jl such that we have a unified API to allocate the tape and switch the AD backends. |
Thanks @amontoison for this big update! I pin also @frapac who should be interested. |
We also have benchmarks with the problems from |
Note that the speed up wrt to Symbolics was UP TO 100x, and only computed on Jacobian test cases (this was before SCT had Hessian functionality). Can't say how we would compare on Hessians. I just don't want to over promise 😉 |
@amontoison is there a list of the problems descriptions? |
Not yet on the README.md :( |
👍🏽 @amontoison @gdalle many thanks! having a look & try at it 🤞🏾
|
Hi everyone, thanks for the update. |
Check out the performance benchmarks too! |
@PierreMartinon I had not noticed this commit that merges our colleagues changes: thanks 🙏🏽 I do not see any new release of |
We plan to update the coloring quite soon with @gdalle. |
Overselling again ;) The benchmarks are shown here JuliaSmoothOptimizers/ADNLPModels.jl#237 Hessian speedups will be virtually inexistent (maybe x2), Jacobian speedups will be x10 to x100 but mainly because ColPack was being used incorrectly |
Major speed-up for Jacobian coloring :) |
@amontoison overselling you 🤭 @PierreMartinon new release...? |
I will release ADNLPModels.jl |
Nice ! I'll update CTDirect soon. We can keep the 0.8 compat entry for ADNLPModels for now to force the upgraded versions. Edit: 0.6.1 is out |
@PierreMartinon looks like this issue can be closed: please do it if you're OK! |
Hi everyone, |
Something seems wrong with Symbolics at the moment: multiple warnings about deprecated calls, and errors on unknown method.
ERROR: LoadError: MethodError: no method matching operation(::Symbolics.TermCombination)
Downgrading from 5.28 to 5.27.1 does not fix the problems.
Stacktrace point to ADNLPModels, downgrading from 0.7.2 to 0.7.1 changes nothing.
Will keep watching.
The text was updated successfully, but these errors were encountered: