Utility Functions
omnirec.util.util.set_log_level(level: str)
Sets log level for OmniRec.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
level
|
str
|
Log level to set. Valid options are CRITICAL, FATAL, ERROR,WARNING, INFO, DEBUG, NOTSET. Log level is case-insensitive. |
required |
Raises:
| Type | Description |
|---|---|
ValueError
|
If the provided log level is not valid. |
Source code in src\omnirec\util\util.py
omnirec.util.util.set_random_state(random_state: int) -> None
Set the global random state for reproducibility.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
random_state
|
int
|
The random state seed. |
required |
omnirec.util.util.get_random_state() -> int
Get the global random state for reproducibility.
Returns:
| Name | Type | Description |
|---|---|---|
int |
int
|
The current random state seed. |