-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
pierre.delaunay
committed
Jul 24, 2024
1 parent
bae0e11
commit ab4a055
Showing
4 changed files
with
80 additions
and
2 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
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 |
---|---|---|
@@ -0,0 +1,34 @@ | ||
from dataclasses import dataclass | ||
|
||
from voir import configurable | ||
from voir.phase import StopProgram | ||
|
||
|
||
@dataclass | ||
class Config: | ||
"""voir configuration""" | ||
|
||
# Whether to display the dash or not | ||
dash: bool = False | ||
|
||
# How often to log the rates | ||
interval: str = "1s" | ||
|
||
# Number of rates to skip before logging | ||
skip: int = 5 | ||
|
||
# Number of rates to log before stopping | ||
stop: int = 20 | ||
|
||
# Number of seconds between each gpu poll | ||
gpu_poll: int = 3 | ||
|
||
|
||
@configurable | ||
def instrument_main(ov, options: Config): | ||
yield ov.phases.init | ||
|
||
try: | ||
yield ov.phases.run_script | ||
except StopProgram: | ||
print("early stopped") |
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 |
---|---|---|
@@ -0,0 +1,34 @@ | ||
from dataclasses import dataclass | ||
|
||
from voir import configurable | ||
from voir.phase import StopProgram | ||
|
||
|
||
@dataclass | ||
class Config: | ||
"""voir configuration""" | ||
|
||
# Whether to display the dash or not | ||
dash: bool = False | ||
|
||
# How often to log the rates | ||
interval: str = "1s" | ||
|
||
# Number of rates to skip before logging | ||
skip: int = 5 | ||
|
||
# Number of rates to log before stopping | ||
stop: int = 20 | ||
|
||
# Number of seconds between each gpu poll | ||
gpu_poll: int = 3 | ||
|
||
|
||
@configurable | ||
def instrument_main(ov, options: Config): | ||
yield ov.phases.init | ||
|
||
try: | ||
yield ov.phases.run_script | ||
except StopProgram: | ||
print("early stopped") |
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