Skip to content

Commit

Permalink
Log usage of forward_init with GEN_KW
Browse files Browse the repository at this point in the history
  • Loading branch information
xjules committed Feb 28, 2025
1 parent 3d3894a commit 436e0b7
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/ert/config/ensemble_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,10 @@ def __post_init__(self) -> None:
[p for p in self.parameter_configs.values() if isinstance(p, GenKwConfig)]
)

self._check_for_forward_init_in_gen_kw(
[p for p in self.parameter_configs.values() if isinstance(p, GenKwConfig)]
)

self.grid_file = _get_abs_path(self.grid_file)

@staticmethod
Expand Down Expand Up @@ -93,6 +97,12 @@ def _check_for_duplicate_gen_kw_param_names(gen_kw_list: list[GenKwConfig]) -> N
f"Found duplicate GEN_KW parameter names: {duplicates_formatted}"
)

@staticmethod
def _check_for_forward_init_in_gen_kw(gen_kw_list: list[GenKwConfig]) -> None:
for gen_kw in gen_kw_list:
if gen_kw.forward_init_file is not None:
logger.info(f"GEN_KW uses FORWARD_INIT: {gen_kw}")

@no_type_check
@classmethod
def from_dict(cls, config_dict: ConfigDict) -> EnsembleConfig:
Expand Down

0 comments on commit 436e0b7

Please sign in to comment.