Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/mlco2/codecarbon
/ toJSON
Method
toJSON
codecarbon/output_methods/emissions_data.py:71–72 ·
view source on GitHub ↗
(self)
Source
from the content-addressed store, hash-verified
69
self.emissions_rate = 0
70
71
def
toJSON(self):
72
return
json.dumps(self, default=
lambda
o: o.__dict__, sort_keys=True, indent=4)
73
74
75
@dataclass
Callers
nothing calls this directly
Calls
no outgoing calls
Tested by
no test coverage detected