Skip to content

Commit 7fee3e5

Browse files
committed
tutorial
1 parent bad6541 commit 7fee3e5

File tree

3 files changed

+1122
-129
lines changed

3 files changed

+1122
-129
lines changed

codegreen_core/tools/carbon_emission.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,8 @@ def compute_ce(
1212
runtime_minutes: int,
1313
) -> tuple[float, pd.DataFrame]:
1414
"""
15-
Calculates the carbon footprint of a job, given its hardware configuration, time, and location.
15+
Calculates the carbon footprint of a job, given the server details , start time and runtime.
1616
This method returns an hourly time series of the carbon emissions.
17-
1817
The methodology is defined in the documentation.
1918
2019
:param server: A dictionary containing the details about the server, including its hardware specifications.
@@ -37,7 +36,7 @@ def compute_ce(
3736
"""
3837

3938
# Round to the nearest hour (in minutes)
40-
# base valued taken from http://calculator.green-algorithms.org/
39+
# base values taken from http://calculator.green-algorithms.org/
4140

4241
rounded_runtime_minutes = round(runtime_minutes / 60) * 60
4342
end_time = start_time + timedelta(minutes=rounded_runtime_minutes)

0 commit comments

Comments
 (0)