Skip to content

Commit 9a5f5a9

Browse files
author
Felipe Mello
committed
raise error if cfg arg is missing
1 parent 82b3e1a commit 9a5f5a9

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/forge/observability/metric_actors.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -217,11 +217,14 @@ def _validate_backend_config(
217217
) -> dict[str, Any]:
218218
"""Validate and normalize backend configuration."""
219219
if "logging_mode" not in config:
220-
logger.debug(
221-
f"logging_mode not provided for backend {backend_name}. Defaulting to global_reduce."
220+
raise ValueError(
221+
f"logging_mode is required for backend '{backend_name}' but was not provided. "
222+
f"Please specify a logging_mode in your config. "
223+
f"See forge.observability.metrics.LoggingMode for available options: "
224+
f"{', '.join([mode.value for mode in LoggingMode])}."
222225
)
223226

224-
mode_str = config.get("logging_mode", "global_reduce")
227+
mode_str = config["logging_mode"]
225228
mode = LoggingMode(mode_str)
226229

227230
# Validate per_rank_share_run configuration

0 commit comments

Comments
 (0)