nemo_evaluator.core.utils#

Module Contents#

Functions#

check_endpoint

Check if the endpoint is responsive and ready to accept requests.

check_health

Check the health of the server.

deep_update

Deep update a mapping with other mappings.

dotlist_to_dict

Resolve dot-list style key-value pairs with YAML.

run_command

Data#

API#

nemo_evaluator.core.utils.KeyType#

‘TypeVar(…)’

exception nemo_evaluator.core.utils.MisconfigurationError[source]#

Bases: Exception

Common base class for all non-exit exceptions.

Initialization

Initialize self. See help(type(self)) for accurate signature.

nemo_evaluator.core.utils.check_endpoint(
endpoint_url: str,
endpoint_type: str,
model_name: str,
max_retries: int = 600,
retry_interval: int = 2,
) bool[source]#

Check if the endpoint is responsive and ready to accept requests.

nemo_evaluator.core.utils.check_health(
health_url: str,
max_retries: int = 600,
retry_interval: int = 2,
) bool[source]#

Check the health of the server.

nemo_evaluator.core.utils.deep_update(
mapping: dict[nemo_evaluator.core.utils.KeyType, Any],
*updating_mappings: dict[nemo_evaluator.core.utils.KeyType, Any],
skip_nones: bool = False,
) dict[nemo_evaluator.core.utils.KeyType, Any][source]#

Deep update a mapping with other mappings.

If skip_nones is True, then the values that are None in the updating mappings are not updated.

nemo_evaluator.core.utils.dotlist_to_dict(dotlist: list[str]) dict[source]#

Resolve dot-list style key-value pairs with YAML.

Helper for overriding configuration values using command-line arguments in dot-list style.

nemo_evaluator.core.utils.logger#

‘get_logger(…)’

nemo_evaluator.core.utils.run_command(command, cwd=None, verbose=False, propagate_errors=False)[source]#