-
Notifications
You must be signed in to change notification settings - Fork 22
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
Version 1.5.7 brakes ModelingToolkit #92
Comments
Thanks! I consider setproperties_object(obj::SymbolicUtils.BasicSymbolic{T}, patch) where T
@ SymbolicUtils /tmp/testdepot/packages/SymbolicUtils/EGhOJ/src/types.jl:92 If they need to overload, the overload should probalby have signature |
See also: https://discourse.julialang.org/t/modelingtoolkit-fails-to-pre-compile/118361/2 for a discussion in which package this should be fixed. |
There's an open PR (which IMO should also be backported): JuliaSymbolics/SymbolicUtils.jl#634 |
For backwards compatability can this get a deprecation? We can patch SymbolicUtils a bit but this is pretty disruptive. It's fine for it to only be considered in hindsight but There's many versions of this in earlier Symbolics going back years, and patching all version is much more difficult in comparison to just putting one depwarn. |
Sure feel free anybody to make a PR. I am a little unclear though when exactly you want a warning. |
This broke a bunch of my CI, could this change be reverted? |
Hmm, I thought SymbolicsUtils fixed their bug (judging by comments above)... That package defined a method for an internal ConstructionBase function instead of the corresponding public function. |
In my env, SymbolicUtils is limited to a version range (by some other package I guess) that wasn’t patched. Unless you were to patch every version of SymbolicUtils, there are some versions with this issue. I think the right way to solve this is to patch it here. It’s too much of a disruptive change to have it be a minor version release let alone a patch release |
We patched all the way down to v0.19 IIRC. |
I get your sentiments, but adding methods to undocumented internals is really on SymbolicUtils.jl. Those methods could have had leading underscores to make it really clear they are internals, but they are just to split up fallback They're not documented anywhere as something to rely on. (But if you PR a satisfactory fix for all it will likely be merged) |
We patched down to v0.19 IIRC which was the first version that had done this, so the latest patch of every released major should already have the fix. If that isn't the case, the please be clear on which version was missed. |
Great, sorry I didn't see your first comment I was replying to @MilesCranmer |
I think it was v1.4 of SymbolicUtils for me, despite v1.7 of SymbolicUtils existing. So I think some package was limiting it from being upgraded to v1.7 for whatever reason (and it only happened on Julia <=1.8). This chain of compat constraints seems to have triggered the bug in my CI. @ChrisRackauckas maybe you could make a PR to the registry that constrains all versions of SymbolicUtils to be <=1.5.6 of ConstructionBase? That way there is no worry about individual versions.
@rafaqz I agree in principle. But I would say if a patch version breaks ~10s of dependencies, then this rule should be broken, and an exception should be made. Especially because the function name doesn't have an underscore and the Julia |
This is a pretty hard operation. @DilumAluthge do you have a script that could do something like that? |
I think all you would need to do is modify this line: https://github.com/JuliaRegistries/General/blob/f8db78d600845180cb8c2f3f144da08a449f4415/S/SymbolicUtils/Compat.toml#L122 as follows ["0.9-3"]
- ConstructionBase = "1.1.0-1"
+ ConstructionBase = "1.1.0-1.5.6" |
Is there anything broken aside from older SymbolicUtils versions? JuliaHub search doesn't point to any package using or defining this function: https://juliahub.com/ui/Search?type=symbols&q=setproperties_object. Note that it's quite unusual to hold packages to a higher versioning standard than Julia itself. Julia minor releases regularly break packages that rely on internals. |
The ~10 was a guesstimate based on the sparse sample seen in this thread (ModelingToolkit, Pluto, SymbolicUtils, SymbolicRegression, DynamicExpressions, ...), I don't know an actual number. On my side I had CI broken for SymbolicRegression.jl and DynamicExpressions.jl which have SymbolicUtils as a weak dependency: https://github.com/MilesCranmer/SymbolicRegression.jl/actions/runs/10567452338/job/29276449034?pr=326#step:6:377. I have not been able to figure out what package is limiting their versions to 1.4.0, which prevents me from getting Chris's patch. What is the 1.5.7 patch? Is it essential, or can it be rolled back, considering the breakages reported thus far? |
See JuliaObjects/ConstructionBase.jl#92 for the full conversation.
See JuliaObjects/ConstructionBase.jl#92 for the full conversation.
It should be bounded now. I did another release that bumps the minor so it's not exactly the same as what @MilesCranmer requested, but very similar. Please up and see if there's any issues left. |
Cool I think this can be closed now. Thanks Chris! |
Feel free to reopen anybody if something is missing here. |
* chore: update gitignore * remove precompilation * wip: get many parts of expression interface working * get more parts working for parametric expressions * fix constant optimization for expressions * various fixes for expressions * fix other parts of expression interface * specialize operators * wip: almost working creation * more parts working * fix up other parts of parametric expression * create mutate constant for parameters * fix strings * fix strings * formatting * fix complexity * chore: bump DynamicExpressions * feat: undo abstract expression changes to InterfaceDynamicExpressions * feat: add index parameter for Dataset * feat: set node_type based on expression_type * feat: export node_type * generalize initialization for expressions * add example of parameterized functions * formatting * fix various issues with expressions * user expressions on regular trees * fix various issues with expressions in tests * turn back on precompilation * fix conversion steps * fix bug introduced by `get_tree_from_member` * fix symbolic import * missing union * switch to zygote for optimization * feat: allow user-specified autodiff backend; finite or zygote * feat: add TODO item * refactor: use callable structs rather than anonymous functions * test: run parametrized function example * ci: split up tests into three parts * test: fix jet error * feat: use DifferentiationInterface.jl for AD backend * run parametrized_function example for test * fix: `default_node -> default_node_type` * feat: allow symbol for autodiff backend * chore: set version to alpha instead * test: commit Manifest to reference alpha DE * build: delete Manifest.toml * feat: better printing for halls of fame * style: remove extra space * refactor: improve printing of PopMember * refactor: avoid holding operators within expressions * refactor: rename expressions interface * fix: stripping of metadata in loaded state * test: fix stripping of metadata * fix: order of ParametricExpression arguments * test: declare instabilities * test: fix remaining issues with test * test: fix missing import * refactor: use correct interface option * chore: bump DynamicExpressions version * chore: bump SymbolicUtils * chore: fix symbolic regression version * test: fix test interference * test: fix stop on clock test * fix: jet issues with union splitting * test: skip jet test on 1.11 * fix: various method ambiguities * chore: update DE * fix: jet union split * fix: use of `simplify_tree!` * chore: bump DE version * feat: add classes feature to MLJ interface * fix: mlj interface for classes * refactor: move jet test to end * refactor: update MLJ scitype * style: clean up interface code * fix missing import * limit max calls in optimization * reduce `niterations` * split up MLJ test * split up test_mixed * speed up mixed test * add tags on integration tests * clean up test mixed util * float up redundant lines * simpler type assertion * tests of new print_tree behavior * test derivative helper functions * test other printing methods * test that new options dont change PopMember printout * full test of break random connection * test form_random_connection! * remove unused converter * smoke test for warm start parametrized function * add early_stop_condition to long mixed tests * fix parameterized function test * early stop condition for parameter test * make sure MLJ tests run * fix parametrized function test * avoid recursion with keyword args * add checks for classes in MLJ * clear all variables in test_params.jl * fix parametrized expressions being reset * fix parameterized function example not selecting last * fix: simplification within SingleIteration * test: gradients during optimization * test: fix parametrized function example * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * test: gradients of parametric expression * feat: get Zygote gradients working for `ParametricExpressions` * chore: bump DynamicExpression dependency * fix: ensure we continue in parametrized function test * chore: bump DE version * feat: better monitor of bottlenecks * feat: dont print occupation during warmup * feat: use `Threads.@spawn` over `@async` * feat: don't print worker occupation temporarily * feat: wip Enzyme support * feat: working Enzyme gradients in loss function * deps: add Enzyme to dependencies * test: update evaluator tests api calls * refactor: fix ambiguity * feat: Enzyme gradients for ParametricExpression * fix: move back to `@async` to fix race condition * test: only run Enzyme test on Julia 1.10 * feat: back to fast loss functions * feat: explicit stack size for Enzyme * feat: set stack size to 32 MB for Enzyme * ci: move Enzyme test to part 3 * test: skip Enzyme test on 1.11 * refactor: remove unused function * test: make stop condition earlier * test: fix env in mlj tests * test: avoid unicode line endings to fix JuliaSyntax bug * fix: type instability in `init_dummy_pops` This instability is seen only on some operating systems and Julia versions. * fix: more type stability for Enzyme * test: force specialized operators for Enzyme * fix: issue with outer threads loop * deps: update DynamicExpressions version * refactor: clean up stale imports with ExplicitImports.jl * feat: expose new `get_scalar_constants` and `set_scalar_constants!` * fix: ensure `dataset.weights` is copied for Enzyme analysis * refactor: only copy batched portion * hack: delete all old artifacts * ci: undo cache clearing * deps: bump DE with depwarn fix * feat: add new string representations via dispatch * refactor: `dataset.weights` not actually Enzyme issue * fix: avoid storing `StatsBase.Weights` within `Options` * fix: ensure we mark `@nospecialize`d argument as `@unstable` * fix: consistency checks in metadata stripping * fix: ignore functions in Enzyme and ChainRulesCore * fix: EnzymeRules marking * Revert "fix: EnzymeRules marking" This reverts commit 002df6d. * Revert "fix: ignore functions in Enzyme and ChainRulesCore" This reverts commit b4265c1. * ci: test Enzyme separately * ci: ensure Preferences.jl installed * Revert "ci: ensure Preferences.jl installed" This reverts commit eb7cde1. * Revert "ci: test Enzyme separately" This reverts commit 0d7fb80. * ci: skip Enzyme tests completely * refactor: create `@ignore`d code to appease static analysis * refactor: clean up constructor of options * refactor: clean up constraint constructor * refactor: reduce some specialization * test: ensure DynamicExpressions installed for preferences * fix: mistaken assertion * fix: repeated depwarns cause dict write error * fix: prevent bad RNGs in MLJ tests * test: improve parameterized function example * refactor: clean up imports * test: make clocked test use serial mode * test: ensure options are lighterweight for clock test * test: increase npop for mlj test that fails sometimes * feat: create `PerThreadCache` for efficient caching * refactor: use `PerThreadCache` for safe functions * build: specify preferences in project * deps: bump SymbolicUtils to 3 * deps: bump DynamicQuantities to 1 * deps: fix compat settings * deps: force SymbolicUtils 2+ * deps: fix issue with [compat] on older Julia * deps: add back old SymbolicUtils * deps: fix DE version * deps: skip ConstructionBase bug See JuliaObjects/ConstructionBase.jl#92 * deps: move ConstructionBase to extras * ci: force clear cache upon new Project.toml * deps: force ConstructionBase dependency to fix version * test: verbose printing of tests * test: make dimensional test reproducible * test: split up dimensional analysis tests * test: set up early stopping for test * test: note slow tests * test: fix missing operator * Lasr parametric expressions (#1) * base integration commit * add llm functions * update package name * Add prompts dir * minor bug fixes while getting code in working order * add integration tests --------- Co-authored-by: Arya Grayeli <[email protected]> --------- Co-authored-by: MilesCranmer <[email protected]> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Arya Grayeli <[email protected]>
Since this morning I could not install ModelingToolkit any longer. I got the error:
Downgrading ConstructionsBase to version 1.5.6 fixed the issue.
The text was updated successfully, but these errors were encountered: