From 71aa6f5092ec40cd2f1c159eac9b6f26704d0dae Mon Sep 17 00:00:00 2001 From: Sebastian Gsell Date: Mon, 27 May 2024 17:03:32 +0200 Subject: [PATCH 1/5] Comment out --- codecov.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/codecov.yml b/codecov.yml index dc3f2bbb..d6a7da96 100644 --- a/codecov.yml +++ b/codecov.yml @@ -18,5 +18,5 @@ ignore: - tests/* - tests/**/* - .tox/**/* - - src/dcegm/likelihood.py + # - src/dcegm/likelihood.py - src/dcegm/interface.py From e775f5de1621523aa8eff4ebd81dfcc29b9ac727 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 27 May 2024 15:04:26 +0000 Subject: [PATCH 2/5] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- src/dcegm/egm/aggregate_marginal_utility.py | 3 +-- src/dcegm/pre_processing/state_space.py | 2 +- src/dcegm/simulation/simulate.py | 1 - 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/dcegm/egm/aggregate_marginal_utility.py b/src/dcegm/egm/aggregate_marginal_utility.py index 44ffeb7a..9c50a00b 100644 --- a/src/dcegm/egm/aggregate_marginal_utility.py +++ b/src/dcegm/egm/aggregate_marginal_utility.py @@ -80,8 +80,7 @@ def aggregate_marg_utils_and_exp_values( def calculate_choice_probs_and_unsqueezed_logsum( - choice_values_per_state: jnp.ndarray, - taste_shock_scale: float + choice_values_per_state: jnp.ndarray, taste_shock_scale: float ) -> Tuple[jnp.ndarray, jnp.ndarray, jnp.ndarray]: max_value_per_state = jnp.nanmax(choice_values_per_state, axis=1, keepdims=True) diff --git a/src/dcegm/pre_processing/state_space.py b/src/dcegm/pre_processing/state_space.py index 984688cc..d547211a 100644 --- a/src/dcegm/pre_processing/state_space.py +++ b/src/dcegm/pre_processing/state_space.py @@ -478,7 +478,7 @@ def create_indexer_for_space(space): max_var_values + 1, fill_value=-99999999, dtype=np.int64 ) index_tuple = tuple(space[:, i] for i in range(space.shape[1])) - + map_vars_to_index[index_tuple] = np.arange(space.shape[0], dtype=np.int64) return map_vars_to_index diff --git a/src/dcegm/simulation/simulate.py b/src/dcegm/simulation/simulate.py index 9deb8e4a..9560b872 100644 --- a/src/dcegm/simulation/simulate.py +++ b/src/dcegm/simulation/simulate.py @@ -5,7 +5,6 @@ import jax.numpy as jnp import numpy as np from dcegm.interface import get_state_choice_index_per_state - from dcegm.simulation.sim_utils import compute_final_utility_for_each_choice from dcegm.simulation.sim_utils import draw_taste_shocks from dcegm.simulation.sim_utils import interpolate_policy_and_value_for_all_agents From 27db55b6e4a2d690f5389b061f4751aba7b4d7f9 Mon Sep 17 00:00:00 2001 From: Sebastian Gsell Date: Mon, 27 May 2024 17:09:10 +0200 Subject: [PATCH 3/5] Remove outdated exclude patterns --- .pre-commit-config.yaml | 2 -- codecov.yml | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 76a36288..72be6896 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -56,7 +56,6 @@ repos: hooks: - id: black language_version: python3.10 - exclude: tests/utils/fast_upper_envelope_org.py # - repo: https://github.com/charliermarsh/ruff-pre-commit # rev: v0.0.282 # hooks: @@ -77,7 +76,6 @@ repos: - --wrap-descriptions - '88' - --blank - exclude: tests/utils/fast_upper_envelope_org.py - repo: https://github.com/nbQA-dev/nbQA rev: 1.7.0 hooks: diff --git a/codecov.yml b/codecov.yml index d6a7da96..dc3f2bbb 100644 --- a/codecov.yml +++ b/codecov.yml @@ -18,5 +18,5 @@ ignore: - tests/* - tests/**/* - .tox/**/* - # - src/dcegm/likelihood.py + - src/dcegm/likelihood.py - src/dcegm/interface.py From a73e00cff138bd79db0d6bf1e676bc14f53c9c52 Mon Sep 17 00:00:00 2001 From: Sebastian Gsell Date: Mon, 27 May 2024 17:14:58 +0200 Subject: [PATCH 4/5] Update README --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 0678f8cb..4d905972 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,7 @@ [![Continuous Integration Workflow](https://github.com/OpenSourceEconomics/dcegm/actions/workflows/main.yml/badge.svg)](https://github.com/OpenSourceEconomics/dcegm/actions/workflows/main.yml) [![Codecov](https://codecov.io/gh/OpenSourceEconomics/dcegm/branch/main/graph/badge.svg)](https://app.codecov.io/gh/OpenSourceEconomics/dcegm) [![Black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black) +[![pre-commit.ci status](https://results.pre-commit.ci/badge/github/OpenSourceEconomics/dcegm/main.svg)](https://results.pre-commit.ci/latest/github/OpenSourceEconomics/dcegm/main) Python implementation of the Discrete-Continuous Endogenous Grid Method (DC-EGM) for solving dynamic stochastic lifecycle models of continuous (e.g. consumption-savings) and From b5cf4fb5cbfc82f724fbf0ed4517f88f5edf1f53 Mon Sep 17 00:00:00 2001 From: Sebastian Gsell Date: Mon, 27 May 2024 17:16:24 +0200 Subject: [PATCH 5/5] Reorder badges --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 4d905972..9c86cab3 100644 --- a/README.md +++ b/README.md @@ -2,8 +2,8 @@ [![Continuous Integration Workflow](https://github.com/OpenSourceEconomics/dcegm/actions/workflows/main.yml/badge.svg)](https://github.com/OpenSourceEconomics/dcegm/actions/workflows/main.yml) [![Codecov](https://codecov.io/gh/OpenSourceEconomics/dcegm/branch/main/graph/badge.svg)](https://app.codecov.io/gh/OpenSourceEconomics/dcegm) -[![Black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black) [![pre-commit.ci status](https://results.pre-commit.ci/badge/github/OpenSourceEconomics/dcegm/main.svg)](https://results.pre-commit.ci/latest/github/OpenSourceEconomics/dcegm/main) +[![Black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black) Python implementation of the Discrete-Continuous Endogenous Grid Method (DC-EGM) for solving dynamic stochastic lifecycle models of continuous (e.g. consumption-savings) and