From ae6fd46822ed47fb01ee55a521a9551bd091ac35 Mon Sep 17 00:00:00 2001 From: MichelJuillard Date: Sun, 20 Aug 2023 16:57:35 +0200 Subject: [PATCH] context is saved by Julia serialize() instead of JLD2.save() --- Project.toml | 2 -- README.md | 6 +++--- src/DynareParser.jl | 3 +-- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/Project.toml b/Project.toml index 3e886b53..150a1853 100644 --- a/Project.toml +++ b/Project.toml @@ -21,7 +21,6 @@ FiniteDiff = "6a86dc24-6348-571c-b903-95158fe2bd41" Formatting = "59287772-0a20-5a39-b81b-1366585eb4c0" IntervalSets = "8197267c-284f-5f27-9208-e0e47529a953" IterativeSolvers = "42fd0dbc-a981-5370-80f2-aaf504508153" -JLD2 = "033835bb-8acc-5ee8-8aae-3f567f8a3819" JSON = "682c06a0-de6a-54ab-a142-c8b1cf79cde6" KOrderPerturbations = "469b1a10-d817-41b3-9228-c19fbf63afb5" KalmanFilterTools = "ec016732-9331-11e9-305f-d53cb440b85a" @@ -87,7 +86,6 @@ FiniteDiff = "2.13.1" Formatting = "0.4.2" IntervalSets = "0.6.2, 0.7" IterativeSolvers = "0.9.2" -JLD2 = "0.4.22" JSON = "0.21.2" KOrderPerturbations = "0.1.2" KalmanFilterTools = "0.1.3" diff --git a/README.md b/README.md index 7af0a9d9..0afd2460 100644 --- a/README.md +++ b/README.md @@ -42,10 +42,10 @@ The results are in the ``context`` structure. ## Output 1. The ``context`` structure is saved in the directory - ``//output/.jld2``. It can be loaded with + ``//output/.jls``. It can be loaded with ``` - using JLD2 - DD = load("//output/.jld2")`` + using Serialization + DD = Serialization.deserialize("//output/.jls")`` ``` 1. The IRF graphs are saved in ``//graphs`` diff --git a/src/DynareParser.jl b/src/DynareParser.jl index 666ee8c3..26f81c0d 100644 --- a/src/DynareParser.jl +++ b/src/DynareParser.jl @@ -2,7 +2,6 @@ using CSV using DataFrames using ExtendedDates using FastLapackInterface -using JLD2 using JSON using Plots using StatsFuns @@ -491,7 +490,7 @@ end function save_context(context::Context, filepath::String) filename = split(filepath, "/")[end] outputpath = mkpath(joinpath(filepath, "output")) - save(joinpath(outputpath, "$(filename).jld2"), "context", context) + serialize(joinpath(outputpath, "$(filename).jls"), context) return nothing end