Skip to content

Commit

Permalink
roll back set to zero bcs zygote breaks
Browse files Browse the repository at this point in the history
  • Loading branch information
thorek1 committed Sep 23, 2023
1 parent 3a44e78 commit 48a4d25
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion docs/src/unfinished_docs/todo.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
- [ ] Find any SS by optimising over both SS guesses and parameter inputs
- [ ] weed out SS solver and saved objects

- [x] set to 0 SS values < 1e-12
- [x] set to 0 SS values < 1e-12 - doesnt work with Zygote
- [x] sylvester with analytical derivatives (much faster if sparse) instead of implicit diff - yes but there are still way too large matrices being realised. implicitdiff is better here
- [x] autocorr to statistics output and in general for higher order pruned sols
- [x] fix product moments and test for cases with more than 2 shocks
Expand Down
6 changes: 3 additions & 3 deletions src/MacroModelling.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1668,9 +1668,9 @@ function solve_steady_state!(𝓂::β„³, symbolic_SS, Symbolics::symbolics; verbo
$(SS_solve_func...)
if scale == 1
# return ComponentVector([$(sort(union(𝓂.var,𝓂.exo_past,𝓂.exo_future))...), $(𝓂.calibration_equations_parameters...)], Axis([sort(union(𝓂.exo_present,𝓂.var))...,𝓂.calibration_equations_parameters...])), solution_error
NSSS_solution = [$(Symbol.(replace.(string.(sort(union(𝓂.var,𝓂.exo_past,𝓂.exo_future))), r"ᴸ⁽⁻?[⁰¹²³⁴⁡⁢⁷⁸⁹]+⁾" => ""))...), $(𝓂.calibration_equations_parameters...)]
NSSS_solution[abs.(NSSS_solution) .< 1e-12] .= 0
return NSSS_solution , solution_error
# NSSS_solution = [$(Symbol.(replace.(string.(sort(union(𝓂.var,𝓂.exo_past,𝓂.exo_future))), r"ᴸ⁽⁻?[⁰¹²³⁴⁡⁢⁷⁸⁹]+⁾" => ""))...), $(𝓂.calibration_equations_parameters...)]
# NSSS_solution[abs.(NSSS_solution) .< 1e-12] .= 0 # doesnt work with Zygote
return [$(Symbol.(replace.(string.(sort(union(𝓂.var,𝓂.exo_past,𝓂.exo_future))), r"ᴸ⁽⁻?[⁰¹²³⁴⁡⁢⁷⁸⁹]+⁾" => ""))...), $(𝓂.calibration_equations_parameters...)] , solution_error
end
end
end
Expand Down

0 comments on commit 48a4d25

Please sign in to comment.