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