Open HenriLaurie opened 3 years ago
Seems like it's related to the training loop of the ude. Have you tried running it from the terminal directly? Otherwise, the initial parameters of the network might have an influence, which should be handled by the random seed. If you haven't changed anything else.
Hm. Running from REPL. Getting precompilation warnings I didn't see in Code-OSS, about ModelingToolkit and Enzyme (under DiffEqFlux). But such warnings shouldn't matter, should they?
Anyway, the error remains, same message. I notice I pasted the same extract twice. Here is what I meant to include, it confirms that it is during the sciml_train() call that things go wrong.
[46] sciml_train(::typeof(loss_fit), ::Vector{Float64}, ::BFGS{LineSearches.InitialStatic{Float64}, LineSearches.HagerZhang{Float64, Base.RefValue{Bool}}, Nothing, Float32, Flat}, ::Nothing; lower_bounds::Nothing, upper_bounds::Nothing, maxiters::Int64, kwargs::Base.Iterators.Pairs{Union{}, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
@ DiffEqFlux ~/.julia/packages/DiffEqFlux/MUw49/src/train.jl:91
[47] top-level scope
@ ~/WorkInProgress/ODEswithJulia2021/Week 3/universal_differential_equations/LotkaVolterra/hudson_bay.jl:209
[48] include(fname::String)
@ Base.MainInclude ./client.jl:444
[49] top-level scope
@ REPL[9]:1
in expression starting at /home/henri/WorkInProgress/ODEswithJulia2021/Week 3/universal_differential_equations/LotkaVolterra/hudson_bay.jl:209
I assume that this has to do with dependencies crashing with each other. The tagged version of MTK should not be dependent on Enzyme ( AFAIK - might have changed recently, @ChrisRackauckas might know something more. ).
This is more on the DiffEqFlux side but has to do with adjusting the sensitivity algorithm's hyperparameters or the optimizers' learning rate.
Ah thanks. I am in the first place interested because I am using this material for a course I am currently teaching (Julia for ODEs, so I don't mind if one or two cutting edges are very platform-dependent). In the second place, of course, is the basic scientific interest. I commend all of you working on this paper and related projects. It seems to me a fascinating and very promising approach.
The latest DiffEqSensitivity is setup with Enzyme. So you're saying that's giving precompilation issues?
Yep. A warning (DiffEqFlux precompile, though):
[ Info: Precompiling DiffEqFlux [aae7a2af-3d4f-5e19-a356-7da93b79d9d0]
WARNING: could not import Compiler.EnzymeCtx into Enzyme
But is the code then failing? v1.6?
v 1.6.2 to be precise. Yes, the warnings are generated by the Pkg...() calls at the start of the file. SOrry, gotta teach
Do you get an error or just a warning?
You got the people's mad at me @wsmoses
Quick reply -- just a warning
I am trying to run the code in LotkaVolterra of universal_differential_equations.jl. Am succeeding with them except for hudson_bay.jl. Here is the first few lines of the error message:
and the last few lines
Called by
include()
in the REPL of Code-OSS, with the LotkaVolterra directory instantiated (so I think using the .toml files as downloaded).