Skip to content

Commit 72660f5

Browse files
author
Felipe Mello
committed
simplify comments
1 parent 6fc11bb commit 72660f5

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

src/forge/observability/metrics.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -456,19 +456,18 @@ async def init_backends(
456456
self.per_rank_no_reduce_backends: list[LoggerBackend] = []
457457

458458
# Initialize backends based on logging mode
459-
# logging_mode is expected to be a LoggingMode enum from GlobalLoggingActor validation
460459
for backend_name, backend_config in config.items():
461460
mode = backend_config["logging_mode"]
462461

463-
# Defensive check - logging_mode should already be a LoggingMode enum
462+
# sanity check
464463
if not isinstance(mode, LoggingMode):
465464
raise TypeError(
466-
f"Expected LoggingMode enum for {backend_name}.logging_mode, got {type(mode).__name__}: {mode}."
465+
f"Expected LoggingMode enum for {backend_name}.logging_mode, got {type(mode)}: {mode}."
467466
)
468467

469-
# Skip local instantiation for GLOBAL_REDUCE
470-
# Backend will be instantiated in GlobalLoggingActor
468+
# Skip local instantiation. Backend will be instantiated in GlobalLoggingActor.
471469
if mode == LoggingMode.GLOBAL_REDUCE:
470+
logger.debug("Skipping local instantiation for GLOBAL_REDUCE")
472471
continue
473472

474473
# get metadata from primary backend if any

0 commit comments

Comments
 (0)