nemo_evaluator.core.input
#
Module Contents#
Functions#
Checks if task invocation is formatted correctly and a harness or task is available: |
|
Infers harness information from evaluation config and wraps it into Evaluation |
|
Load the run configuration from the YAML file. |
|
Parse CLI arguments into the run configuration format. |
|
Validates requested task through a dataclass. Additionally, handles creation of task folowing the logic: |
Data#
API#
- nemo_evaluator.core.input.check_task_invocation(run_config: dict)[source]#
Checks if task invocation is formatted correctly and a harness or task is available:
Args: run_config (dict): description
Raises: MisconfigurationError: if eval type does not follow specified format MisconfigurationError: if provided framework is not available MisconfigurationError: if provided task is not available
- nemo_evaluator.core.input.check_type_compatibility(
- evaluation: nemo_evaluator.api.api_dataclasses.Evaluation,
- nemo_evaluator.core.input.get_available_evaluations() tuple[dict[str, dict[str, nemo_evaluator.api.api_dataclasses.Evaluation]], dict[str, nemo_evaluator.api.api_dataclasses.Evaluation], dict] [source]#
- nemo_evaluator.core.input.get_evaluation(
- evaluation_config: nemo_evaluator.api.api_dataclasses.EvaluationConfig,
- target_config: nemo_evaluator.api.api_dataclasses.EvaluationTarget,
Infers harness information from evaluation config and wraps it into Evaluation
Args: evaluation_config (EvaluationConfig): description
Returns: Evaluation: EvalConfig
- nemo_evaluator.core.input.get_framework_evaluations(
- filepath: str,
- nemo_evaluator.core.input.load_run_config(yaml_file: str) dict [source]#
Load the run configuration from the YAML file.
NOTE: The YAML config allows to override all the run configuration parameters.
- nemo_evaluator.core.input.logger#
‘get_logger(…)’
- nemo_evaluator.core.input.parse_cli_args(args) dict [source]#
Parse CLI arguments into the run configuration format.
NOTE: The CLI args allow to override a subset of the run configuration parameters.
- nemo_evaluator.core.input.parse_override_params(
- override_params_str: str | None = None,
- nemo_evaluator.core.input.prepare_output_directory(
- evaluation: nemo_evaluator.api.api_dataclasses.Evaluation,
- nemo_evaluator.core.input.validate_configuration(
- run_config: dict,
Validates requested task through a dataclass. Additionally, handles creation of task folowing the logic:
evaluation type can be either ‘framework.task’ or ‘task’
FDF stands for Framework Definition File
Args: run_config_cli_overrides (dict): run configuration merged from config file and CLI
Raises: