Spaces:
Running
Running
Commit
·
74a1fce
1
Parent(s):
a910a1e
fix: Use max value for CO2 emissions in GPU summary card
Browse filesChanged from delta calculation (final - initial) to max value to avoid negative values
- screens/trace_detail.py +2 -5
screens/trace_detail.py
CHANGED
|
@@ -595,11 +595,8 @@ def create_gpu_summary_cards(df):
|
|
| 595 |
memory_used = df['gpu_memory_used_mib'].max() if 'gpu_memory_used_mib' in df.columns else 0
|
| 596 |
temperature = df['gpu_temperature_celsius'].max() if 'gpu_temperature_celsius' in df.columns else 0
|
| 597 |
|
| 598 |
-
# CO2 emissions
|
| 599 |
-
if 'co2_emissions_gco2e' in df.columns
|
| 600 |
-
co2_emissions = df['co2_emissions_gco2e'].iloc[-1] - df['co2_emissions_gco2e'].iloc[0]
|
| 601 |
-
else:
|
| 602 |
-
co2_emissions = 0
|
| 603 |
|
| 604 |
power = df['gpu_power_watts'].mean() if 'gpu_power_watts' in df.columns else 0
|
| 605 |
|
|
|
|
| 595 |
memory_used = df['gpu_memory_used_mib'].max() if 'gpu_memory_used_mib' in df.columns else 0
|
| 596 |
temperature = df['gpu_temperature_celsius'].max() if 'gpu_temperature_celsius' in df.columns else 0
|
| 597 |
|
| 598 |
+
# CO2 emissions - use max value (cumulative total)
|
| 599 |
+
co2_emissions = df['co2_emissions_gco2e'].max() if 'co2_emissions_gco2e' in df.columns else 0
|
|
|
|
|
|
|
|
|
|
| 600 |
|
| 601 |
power = df['gpu_power_watts'].mean() if 'gpu_power_watts' in df.columns else 0
|
| 602 |
|