metric
zeus.utils.metric
Defines the energy-time cost metric function.
zeus_cost
zeus_cost(energy, time, eta_knob, max_power)
Compute Zeus's energy-time cost metric.
Trades off ETA and TTA based on the value of eta_knob
.
The caller is expected to do bound checking for eta_knob
,
because eta_knob
does not change frequently.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
energy |
float
|
Joules |
required |
time |
float
|
seconds |
required |
eta_knob |
float
|
Real number in [0, 1]. |
required |
max_power |
int | float
|
The maximum power limit of the GPU. |
required |
Returns:
Type | Description |
---|---|
float
|
The cost of the DL training job. |
Source code in zeus/utils/metric.py
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
|
energy
energy(logfile, start=None, end=None)
Compute the energy consumption from the Zeus monitor power log file.
start
and end
are in units of seconds, relative to the beginning of
the time window captured by the log file. Only the time window between
start
and end
will be considered when computing energy.
start
and end
can be negative, in which case the pointers wrap around
and effectively the absolute value is subtracted from the end of the window.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
logfile |
Path | str
|
Path to the power log file produced by the Zeus monitor. |
required |
start |
float | None
|
Start time of the window to consider. |
None
|
end |
float | None
|
End time of the window to consider. |
None
|
Source code in zeus/utils/metric.py
35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 |
|
avg_power
avg_power(logfile, start=None, end=None)
Compute the average power consumption from the Zeus monitor power log file.
start
and end
are in units of seconds, relative to the beginning of
the time window captured by the log file. Only the time window between
start
and end
will be considered when computing average power.
start
and end
can be negative, in which case the pointers wrap around
and effectively the absolute value is subtracted from the end of the window.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
logfile |
Path | str
|
Path to the power log file produced by the Zeus monitor. |
required |
start |
float | None
|
Start time of the window to consider. |
None
|
end |
float | None
|
End time of the window to consider. |
None
|
Raises:
Type | Description |
---|---|
ValueError
|
From |
Source code in zeus/utils/metric.py
69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 |
|