Releases: PSLmodels/OG-Core
Releases · PSLmodels/OG-Core
0.16.3
This release:
Adds
- Better functionality and more country repositories with the OG installer. See PR #1162
Fixes
- Fixes an inconsistency with the pre-time path population distribution and growth rates. Note that the
demographics.get_popfunction has been changed and now only returns one object: the population distribution (not also the distribution prior to the start year). In addition, theget_popandget_pop_objsfunctions no longer have thepre_pop_distkwarg. See PR #1073.
0.16.2
This release:
Adds
- Adds
output_tables.model_fit_tablefunction that generates a table comparing model output to data for a set of target moments, and adds a test of this function intest_output_tables.py. The function takes as input a list of target moment descriptions, the TPI output dictionary, and the model parameters object, and returns a pandas DataFrame with the target moment descriptions, the model values for those moments, and the data values for those moments (where applicable). The function currently supports a set of macroeconomic moments (interest rate, capital share of output, labor share of output), inequality moments (Gini coefficient for before-tax income and after-tax income), and demographic moments (fraction of population 65+ and population growth rate). See PR #1138. - Validates
beta_annualandchi_bagainstJ. (PR #1149)
Fixes
- Fixes issue with reading UN data on Pandas >= 3.0 and UN token string. (PR #1151)
- Fixes math notation for plot labels. (PR #1148)
- Fixes reshaping issues with
J=1parameterization. (PR #1145) - Fixed math notion for tilde variables in plot labels in
output_plots.pyto be consistent with the documentation and the code. See PR #1148.
0.16.1
This release:
- Adds a
use_sparse_FOC_jacSpecificationsparameter (defaultTrue) that accelerates the time path iteration (TPI) household solve. With it on,scipy.optimize.rootis given a sparse (banded) finite-difference Jacobian for the stacked household Euler and labor first order conditions: the sparsity pattern is auto-detected once per problem size and the solver then needs far fewer function evaluations per Jacobian build (about 20x fewer on the default S=80 cohort solve), with an automatic fallback to dense finite differences if the Jacobian is not sparse enough to benefit or if a solve fails. The result matches the legacy dense-finite-difference solution to within the model's resource-constraint accuracy floor on every calibration tested (OG-Core standard example, OG-ETH, OG-ZAF, OG-PHL, OG-IDN), giving roughly a 1.9-2.4x TPI speedup at no accuracy cost. Setuse_sparse_FOC_jac=Falseto recover bit-identical agreement with v0.16.0 and earlier.
0.16.0
0.15.13
0.15.12
This release:
- Caches the
e_longarray inhousehold.FOC_savingsandhousehold.FOC_laborrather than rebuilding it on every call.e_longis a pure function ofp.e,p.S, andp.J, none of which change during a solve, so a_get_e_longhelper now builds it once per worker and reuses it. Profiling identified this rebuild as the single most expensive operation in a TPI run. The change is a pure cache — model output is bit-for-bit identical to master — and gives roughly a 3x speedup on a single-reform TPI run. See PR #1128. - Builds the per-period tax-parameter slices in
TPI.inner_loopas numpy arrays via a new_params_to_arrayhelper, and switchestxfunc.get_tax_ratestonp.asarray, so the repeated per-call list-to-array conversion is skipped on the hot TPI path.monoandmono2Dtax functions store callables rather than numbers, so their nested-list form is passed through unchanged. Profiling identified this conversion as the next hot spot after thee_longrebuild. Model output is bit-for-bit identical to master, and the change gives roughly a further 10% speedup on a single-reform TPI run (about 3.3x cumulative versus master). See PR #1128. - Changes the minimum of the allowable range for
tau_cindefault_parameters.pyto allow for government consumption subsidies. - Fixes a bug in the
parameter_plots.plot_fert_ratesfunction. See PR #1127.
0.15.11
0.15.10
0.15.9
This release:
- Creates an
ogcorelogging environment so that logging specificed inogcore.configis not overridden by other logging configurations in user code. See PR #1109.
OG-Core/pull/1106). - Includes PR #1111 and PR 1112 that change
build_and_test.ymlto not upload CodeCov statistics for PRs generated by dependabots and updates thecodecov-actionto v5.
0.15.8
This release:
- Updates the
uv.lockfile to the current version ofogcorepackage (0.15.8) - Adds
'**.lock'to the paths inbuild_and_test.ymlso that any changes to theuv.lockfile trigger the GH Action CI tests inbuild_and_test.yml - Incorporates the dependabot updates to
uv.lockversions from PR #1105 and PR #1106.