-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
finished draft for HFGPLO, fixed import errors on usage
- Loading branch information
Showing
3 changed files
with
26 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,12 @@ | ||
|
||
from zeus.monitor import ZeusMonitor | ||
from zeus.optimizer import GlobalPowerLimitOptimizer | ||
|
||
if __name__ == '__main__': | ||
monitor = ZeusMonitor(gpu_indices=[0,1,2,3]) | ||
|
||
monitor.begin_window() | ||
|
||
measurement = monitor.end_window("heavy computation") | ||
from transformers import TrainerCallback, TrainingArguments, TrainerState, TrainerControl, PreTrainedModel | ||
|
||
from zeus.optimizer import HFGPLO | ||
from zeus.monitor import ZeusMonitor | ||
|
||
print(f"Energy: {measurement.total_energy} J") | ||
print(f"Time : {measurement.time} s") | ||
|
||
|
||
plo = GlobalPowerLimitOptimizer(monitor) | ||
|
||
# training loop | ||
import pdb | ||
|
||
plo.on_step_begin() | ||
pdb.set_trace() | ||
|
||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters