Utilities¶
danling.runner.utils
¶
RunnerMode
¶
Bases: LowercaseStrEnum
RunnerMode
is an enumeration of running modes.
Attributes:
Name | Type | Description |
---|---|---|
train |
Training mode. |
|
eval |
Evaluation mode. |
|
inf |
Inference mode. |
Source code in danling/runner/utils.py
on_main_process
¶
Python | |
---|---|
Decorator to run func only on main process.
Source code in danling/runner/utils.py
Python | |
---|---|
on_local_main_process
¶
Python | |
---|---|
Decorator to run func only on local main process.
Source code in danling/runner/utils.py
Python | |
---|---|