Skip to content

Commit

Permalink
Aggregate logging of sampling information
Browse files Browse the repository at this point in the history
A separate log entry for each realization does not provide much
extra value
  • Loading branch information
berland committed Nov 21, 2024
1 parent 19c7192 commit 81e21d9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
4 changes: 0 additions & 4 deletions src/ert/config/gen_kw_config.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
from __future__ import annotations

import logging
import math
import os
import shutil
Expand Down Expand Up @@ -34,8 +33,6 @@

from ert.storage import Ensemble

_logger = logging.getLogger(__name__)


class PriorDict(TypedDict):
key: str
Expand Down Expand Up @@ -239,7 +236,6 @@ def sample_or_load(
if self.forward_init_file:
return self.read_from_runpath(Path(), real_nr)

_logger.info(f"Sampling parameter {self.name} for realization {real_nr}")
keys = [e.name for e in self.transform_functions]
parameter_value = self._sample_value(
self.name,
Expand Down
3 changes: 3 additions & 0 deletions src/ert/enkf_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,9 @@ def sample_prior(
config_node = parameter_configs[parameter]
if config_node.forward_init:
continue
logger.info(
f"Sampling parameter {config_node.name} for realizations {active_realizations}"
)
for realization_nr in active_realizations:
ds = config_node.sample_or_load(
realization_nr,
Expand Down

0 comments on commit 81e21d9

Please sign in to comment.