ChrisRackauckas / universal_differential_equations

Repository for the Universal Differential Equations for Scientific Machine Learning paper, describing a computational basis for high performance SciML
https://arxiv.org/abs/2001.04385
MIT License
215 stars 59 forks source link

No matching function wrapper found #50

Closed schminin closed 1 year ago

schminin commented 1 year ago

I am relatively new to Julia, so please excuse potentially basic questions. I tried running the Lotka Volterra scripts using Julia 1.8. Once I run the line "Optimization.solve(...)" I get a very long error message concluding in "No matching function wrapper was found!". I tried it in a new environment,... Do you have any recommendations how I could solve this?

ChrisRackauckas commented 1 year ago

Sorry, this was a bug introduced when compile times were fixed https://sciml.ai/news/2022/09/21/compile_time/ . It's fixed by https://github.com/SciML/SciMLSensitivity.jl/pull/741 which will be in the next ecosystem update (so wait a day or so). Sorry about that!

ChrisRackauckas commented 1 year ago

Fixed

schminin commented 1 year ago

Thank you for fixing the bug! Unfortunately, after updating all packages, I get a method error due to ambiguity (see below for details).

MethodError: setup(::Adam{Float64}, ::ComponentVector{Float64, Vector{Float64}, Tuple{Axis{(δ = 1, ude = ViewAxis(2:88, Axis(layer_1 = ViewAxis(1:15, Axis(weight = ViewAxis(1:10, ShapedAxis((5, 2), NamedTuple())), bias = ViewAxis(11:15, ShapedAxis((5, 1), NamedTuple())))), layer_2 = ViewAxis(16:45, Axis(weight = ViewAxis(1:25, ShapedAxis((5, 5), NamedTuple())), bias = ViewAxis(26:30, ShapedAxis((5, 1), NamedTuple())))), layer_3 = ViewAxis(46:75, Axis(weight = ViewAxis(1:25, ShapedAxis((5, 5), NamedTuple())), bias = ViewAxis(26:30, ShapedAxis((5, 1), NamedTuple())))), layer_4 = ViewAxis(76:87, Axis(weight = ViewAxis(1:10, ShapedAxis((2, 5), NamedTuple())), bias = ViewAxis(11:12, ShapedAxis((2, 1), NamedTuple())))))))}}}) is ambiguous. Candidates: setup(rule::AbstractRule, model) in Optimisers at ... setup(opt, ps::ComponentArray) in Lux at ... Possible fix, define setup(::AbstractRule, ::ComponentArray)

ChrisRackauckas commented 1 year ago

@avik-pal do you know what's up with that one?

avik-pal commented 1 year ago

https://github.com/avik-pal/Lux.jl/pull/176 should patch it. https://github.com/FluxML/Optimisers.jl/pull/106 started specializing the dispatch on AbstractRule, which caused the breakage.