Open bornhoft opened 3 weeks ago
Hi @bornhoft thanks for getting in touch and for using the package! Sorry for the delayed response, i was on vacation and getting back into the swing of things. Basically I did not find your error to be reproducible here so I have a list of some things below and what i did to try to reproduce your error that perhaps you can compare to your own procedure!
Let me know whether this helps!
you mention calling julia calibrate.jl
but did you mean julia --project calibrate.jl
? missing the --project
flag will use your machines native julia
environment, rather than the local one given by the Project.toml
file in the Sinusoid
directory. I'd highly recommend doing the latter. (see my procedure below). If in doubt of a bad install, delete the localManifest.toml
and re-instantiate/build etc.
Are the packages you use the same as the ones listed below under the package status
call? e.g. JLD2
is v0.5.3
?
JLD2
can be brittle, e.g. changing the JLD2/Julia versions between save
and load
has been know to cause some issues. have you tried removing all the files in output
and rerunning, so it really is writing a new "save" file?
Could you try perhaps commenting out things being saved to see if one in particular is causing an issue. i.e. removing (string,value) pairs, or replacing the saved objects with a value of 1
, from here:
https://github.com/CliMA/CalibrateEmulateSample.jl/blob/e2eba85659d1cfa312942057617484ce22585739/examples/Sinusoid/calibrate.jl#L155-L170
julia version v1.10.5
Clone CES
Navigate cd CalibrateEmulateSample.jl/examples/Sinusoid/
Call julia --project
and then
julia> ]
(Sinusoid) > instantiate
if PyCall has some issue then do (in-line with our installation instructions)
julia> using Pkg
julia> ENV["PYTHON"]=""
julia> Pkg.build("PyCall")
My package status then gives:
julia> ]
(Sinusoid) pkg> status
Status `~/Dropbox/Caltech/CESjl/tmp/CalibrateEmulateSample.jl/examples/Sinusoid/Project.toml`
[95e48a1f] CalibrateEmulateSample v0.5.3
[31c24e10] Distributions v0.25.111
⌅ [aa8a2aa5] EnsembleKalmanProcesses v1.1.7
[033835bb] JLD2 v0.5.3
[91a5bcdd] Plots v1.40.8
I then run the EKI calibration with
julia> include("calibrate.jl")
(equivalent to julia --project calibrate.jl
)
and get output:
Observations:[6.1546719095984805, 6.422583812292371]
Ensemble mean: [3.0513053859865864; 6.3689317470332725;;]
True parameters: [3.0, 7.0]
┌ Warning: Attempting to store EnsembleKalmanProcesses.ParameterDistributions.var"#11#14"{Int64}.
│ JLD2 only stores functions by name.
│ This may not be useful for anonymous functions.
└ @ JLD2 ~/.julia/packages/JLD2/gi4yM/src/data/writing_datatypes.jl:449
... # other warnings
So it produces some kind of JLD2 warnings but runs through. Indeed I can then call
julia> include("emulate.jl")
... # printouts
julia> include("sample.jl")
... # printouts
Hi @odunbar, no worries at all. Thanks for the response!
julia calibrate.jl
instead of julia --project calibrate.jl
. This didn't seem to have an immediate effect, but it is useful after I got my fix.After trying your first few suggestions, I rebuilt using your approach above directly. The only change I needed to make was to point the ENV[PYTHON]="<my conda python>
to my specific conda python
. This ended up working without issue.
The instructions I followed were found here. The ones you posted above are slightly different. Maybe this difference had something to do with it? Either way, I have successfully run the Sinusoid and Lorenz examples.
Thank you for the detailed assistance!
Hi all, I am new to CES, but I am interested in using it for a project. I am working through the tutorials and have come across the same error in both the
Sinusoid
andLorenz
examples. Specifically, when I runjulia calibrate.jl
I get the following error:Any assistance would be greatly appreciated. I may have an issue on my build, but thought this would be the best place to receive support.