Closed cems2 closed 4 years ago
Flux 0.10 was a huge change that moved everything to Zygote, so it'll take a bit to update it. The current status is here: https://github.com/JuliaDiffEq/DiffEqFlux.jl/pull/96
thank you chris.
I'm experimenting this morning with trying to find a mutually compatible set of version with higher version numbers.
so far I've found only incompatible ones. for example I tried Flux 0.10.0 with DiffEqFlux 0.10.0 but package manager said these were incompatiblle so I swithced of Flux 0.9.0 and while everything did compile this time, at run time neural_ode(dudt,x,tspan,Tsit5(),saveat=t,reltol=1e-7,abstol=1e-9) gave an error message about missing some function.
So at the moment I just dowgraded to DiffEqFlux and am trying this again.
Perhaps you could tell me a combination of version numbers for DifferentialEquations DiffEqFlux Flux
that works.
One additionally caveat. I have found that unless Flux.Functor is available I cannot seem to properly add ad hoc parameters to my neuralODE equations and have them optimized. I'm unclear on why that is. Probably something undocumented that I haven't properly figured out. But I think I need that so downgrading too far loses that.
On Dec 24, 2019, at 8:46 AM, Christopher Rackauckas notifications@github.com wrote:
Flux 0.10 was a huge change that moved everything to Zygote, so it'll take a bit to update it. The current status is here: #96 https://github.com/JuliaDiffEq/DiffEqFlux.jl/pull/96 — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/JuliaDiffEq/DiffEqFlux.jl/issues/99?email_source=notifications&email_token=ACRAR7TGTU35UFLCNAQJ5NLQ2IVFVA5CNFSM4J67IDMKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEHTLWFA#issuecomment-568769300, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACRAR7SXVWNTZDZWRBKMZLDQ2IVFVANCNFSM4J67IDMA.
I have now exhaustively tried combinations of Flux and DiffEqFlux versions and find that nothing will work with Flux0.10.0 due to the Tracker Issue.
If I downgrade to Flux0.9.0 I lose the functor capability and have problems creating novel neuralODE layers with trainable parameters.
What is reccomended?
As mentioned, no version will work with Flux 0.10.0 right now. Flux 0.9.0 is fine for developing layers and everything, but it just uses Tracker. It will not be compatible until https://github.com/JuliaDiffEq/DiffEqFlux.jl/pull/96 is done, so if you want it, help finish the last Zygote issue! Basically, Zygote is incompatible with changing the parameters of a neural network manually right now, which is required for using an array for parameters.
Okay I get it now. Didn't understand. I'm new. Took me 3 days to figure out Treelike is the old functor.
On Dec 24, 2019, at 1:48 PM, Christopher Rackauckas notifications@github.com wrote:
As mentioned, no version will work with Flux 0.10.0 right now. Flux 0.9.0 is fine for developing layers and everything, but it just uses Tracker. It will not be compatible until #96 https://github.com/JuliaDiffEq/DiffEqFlux.jl/pull/96 is done, so if you want it, help finish the last Zygote issue! Basically, Zygote is incompatible with changing the parameters of a neural network manually right now, which is required for using an array for parameters.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/JuliaDiffEq/DiffEqFlux.jl/issues/99?email_source=notifications&email_token=ACRAR7UQNBP23G2AJN7UFN3Q2JYSBA5CNFSM4J67IDMKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEHTTNKI#issuecomment-568800937, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACRAR7VYL3MYXNAT4VSDRC3Q2JYSBANCNFSM4J67IDMA.
Fixed on master. It'll be released in about a week.
This issue is superficially similar to #81 but the resolution there was to use a newer Julia. However, this happens in the latest available stable Julia (v1.3).
Problem In julia 1.3 on MacOSX running Pkg.add("DiffEqFlux") will add DiffEqFlux v0.4.0 and Flux 0.10
Flux will precompile but DiffEqFLux will not. Differential Equations also has a problem.
platform Julia v1.3 install on mac os. using Pkg.add to install . Status ~/.julia/environments/v1.3/Project.toml [aae7a2af] DiffEqFlux v0.4.0 [0c46a032] DifferentialEquations v6.6.0 [587475ba] Flux v0.10.0 [7073ff75] IJulia v1.20.2 [91a5bcdd] Plots v0.28.4 [9f7883ad] Tracker v0.2.6
Expected outcome In Julia 1.2, which installs an older (0.9.0) Flux package these errors do not occur and one can use the packages.
Actual Outcome
Errors thrown by DiffEqFlux v0.4.0 precompile Warnings thrown by DifferentialEquations v6.6.0
Regression both warnings and errors refer to Missing Tracker dependency. Addititionally some of the messages seem to say this dependency is supposed to be supplied by the Flux Package.
However the Flux news.md says that Tracker Dependency has been removed in favor or Zygote in Flux 0.10.0 perhaps this has something to do with why it is missing?
I read an older closed Flux issue on Tracker dependency (Flux.jl#695 ) that applies only to earlier revisions of Flux and the fix there was to add Tracker package. But I did this and it does not fix the problem.
I filed a related issue on Flux.jl #975 but I have come to suspect the issue is that the problem is in DiffEqFlux expecting something that is no longer contained in Flux.jl
Workaround I'm not sure if I could revert this to Flux 0.9.0 (and I don't know how to do that ) but even if I did this is not as desirable since the functor macro is not available in that version of Flux
Code to reproduce 100% reproducible Add the packages listed above to julia 1.3 then import DiffEqFlux or DifferentialEquations
Results
A similar result from another package