Output object containing run data
| 5 | |
| 6 | @dataclass |
| 7 | class EmissionsData: |
| 8 | """ |
| 9 | Output object containing run data |
| 10 | """ |
| 11 | |
| 12 | timestamp: str |
| 13 | project_name: str |
| 14 | run_id: str |
| 15 | experiment_id: str |
| 16 | duration: float |
| 17 | emissions: float |
| 18 | emissions_rate: float |
| 19 | cpu_power: float |
| 20 | gpu_power: float |
| 21 | ram_power: float |
| 22 | cpu_energy: float |
| 23 | gpu_energy: float |
| 24 | ram_energy: float |
| 25 | energy_consumed: float |
| 26 | water_consumed: float |
| 27 | country_name: str |
| 28 | country_iso_code: str |
| 29 | region: str |
| 30 | cloud_provider: str |
| 31 | cloud_region: str |
| 32 | os: str |
| 33 | python_version: str |
| 34 | codecarbon_version: str |
| 35 | cpu_count: float |
| 36 | cpu_model: str |
| 37 | gpu_count: float |
| 38 | gpu_model: str |
| 39 | longitude: float |
| 40 | latitude: float |
| 41 | ram_total_size: float |
| 42 | tracking_mode: str |
| 43 | cpu_utilization_percent: float = 0.0 |
| 44 | gpu_utilization_percent: float = 0.0 |
| 45 | ram_utilization_percent: float = 0.0 |
| 46 | ram_used_gb: float = 0.0 |
| 47 | on_cloud: str = "N" |
| 48 | pue: float = 1 |
| 49 | wue: float = 0 |
| 50 | |
| 51 | @property |
| 52 | def values(self) -> OrderedDict: |
| 53 | return OrderedDict(self.__dict__.items()) |
| 54 | |
| 55 | def compute_delta_emission(self, previous_emission): |
| 56 | delta_duration = self.duration - previous_emission.duration |
| 57 | self.duration = delta_duration |
| 58 | delta_emissions = self.emissions - previous_emission.emissions |
| 59 | self.emissions = delta_emissions |
| 60 | self.cpu_energy -= previous_emission.cpu_energy |
| 61 | self.gpu_energy -= previous_emission.gpu_energy |
| 62 | self.ram_energy -= previous_emission.ram_energy |
| 63 | self.energy_consumed -= previous_emission.energy_consumed |
| 64 | self.water_consumed -= previous_emission.water_consumed |
no outgoing calls
searching dependent graphs…