MCPcopy
hub / github.com/geekcomputers/Python / log_metrics

Method log_metrics

ML/src/python/neuralforge/utils/logger.py:54–64  ·  view source on GitHub ↗
(self, metrics: dict, step: Optional[int] = None)

Source from the content-addressed store, hash-verified

52 self.logger.debug(message)
53
54 def log_metrics(self, metrics: dict, step: Optional[int] = None):
55 if step is not None:
56 message = f"Step {step}: "
57 else:
58 message = "Metrics: "
59
60 metric_strs = [f"{k}={v:.4f}" if isinstance(v, float) else f"{k}={v}"
61 for k, v in metrics.items()]
62 message += ", ".join(metric_strs)
63
64 self.info(message)
65
66 def log_model_summary(self, model):
67 total_params = sum(p.numel() for p in model.parameters())

Callers

nothing calls this directly

Calls 1

infoMethod · 0.95

Tested by

no test coverage detected