Skip to content

Commit

Permalink
Log when dark storage fails to load response
Browse files Browse the repository at this point in the history
  • Loading branch information
yngve-sk committed Nov 13, 2024
1 parent 8d286c6 commit d32d419
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/ert/dark_storage/common.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import contextlib
import logging
from typing import Any, Callable, Dict, Iterator, List, Optional, Tuple
from uuid import UUID

Expand All @@ -11,6 +12,8 @@
from ert.config.field import Field
from ert.storage import Ensemble, Experiment, Storage

logger = logging.getLogger(__name__)

response_key_to_displayed_key: Dict[str, Callable[[Tuple[Any, ...]], str]] = {
"summary": lambda t: t[0],
"gen_data": lambda t: f"{t[0]}@{t[1]}",
Expand Down Expand Up @@ -153,7 +156,7 @@ def data_for_key(
realizations = np.where(mask)[0]
data = ensemble.load_responses(response_key, tuple(realizations))
except ValueError as err:
print(f"Could not load response {key}: {err}")
logger.info(f"Dark storage could not load response {key}: {err}")
return pd.DataFrame()

try:
Expand Down

0 comments on commit d32d419

Please sign in to comment.