MCPcopy Create free account
hub / github.com/mlco2/codecarbon / out

Method out

codecarbon/output_methods/logger.py:19–24  ·  view source on GitHub ↗
(self, total: EmissionsData, _)

Source from the content-addressed store, hash-verified

17 self.logging_severity = severity
18
19 def out(self, total: EmissionsData, _):
20 try:
21 payload = dataclasses.asdict(total)
22 self.logger.log(self.logging_severity, msg=json.dumps(payload))
23 except Exception as e:
24 logger.error(e, exc_info=True)
25
26 def live_out(self, total: EmissionsData, _):
27 self.out(total, None)

Callers 3

live_outMethod · 0.95

Calls

no outgoing calls

Tested by 2