nemo_evaluator.adapters.adapter_config#
- pydantic model nemo_evaluator.adapters.adapter_config.AdapterConfig[source]#
Bases:
BaseModelAdapter configuration with registry-based interceptor support
- field discovery: DiscoveryConfig [Optional]#
Configuration for discovering 3rd party modules and directories
- field endpoint_type: str = 'chat'#
Type of the endpoint to run the adapter for
- field interceptors: list[InterceptorConfig] [Optional]#
List of interceptors to use with their configurations
- field log_failed_requests: bool = False#
Whether to log failed requests
- field post_eval_hooks: list[PostEvalHookConfig] [Optional]#
List of post-evaluation hooks to use with their configurations
- classmethod from_legacy_config(
- legacy_config: dict[str, Any],
- run_config: dict[str, Any] | None = None,
Convert legacy configuration to new interceptor-based format.
- Parameters:
legacy_config – Legacy configuration dictionary
run_config – Full run configuration dictionary (optional, used to extract output_dir)
- Returns:
AdapterConfig instance with interceptors based on legacy config
- classmethod get_legacy_defaults() dict[str, Any][source]#
Get default values for legacy configuration parameters.
- classmethod get_validated_config(
- run_config: dict[str, Any],
Extract and validate adapter configuration from run_config.
- Parameters:
run_config – The run configuration dictionary
- Returns:
AdapterConfig instance if adapter_config is present in run_config, None otherwise
- Raises:
ValueError – If adapter_config is present but invalid
- pydantic model nemo_evaluator.adapters.adapter_config.DiscoveryConfig[source]#
Bases:
BaseModelConfiguration for discovering 3rd party modules and directories
- field dirs: list[str] [Optional]#
List of directory paths to discover
- field modules: list[str] [Optional]#
List of module paths to discover
- pydantic model nemo_evaluator.adapters.adapter_config.InterceptorConfig[source]#
Bases:
BaseModelConfiguration for a single interceptor
- field config: dict[str, Any] [Optional]#
Configuration for the interceptor
- field enabled: bool = True#
Whether this interceptor is enabled
- field name: str [Required]#
Name of the interceptor to use
- pydantic model nemo_evaluator.adapters.adapter_config.PostEvalHookConfig[source]#
Bases:
BaseModelConfiguration for a single post-evaluation hook
- Config:
use_enum_values: bool = True
- field config: dict[str, Any] [Optional]#
Configuration for the post-evaluation hook
- field enabled: bool = True#
Whether this post-evaluation hook is enabled
- field name: str [Required]#
Name of the post-evaluation hook to use