"""Auto-generated stub for module: compat."""
from typing import Any, Callable, Optional

# Functions
def ensure_metric_functions(metric_functions: Any[str, Any]) -> dict[str, Any]:
    """
    Ensure required metric function keys exist with safe defaults.
    
        Args:
            metric_functions: Existing metric function mapping from caller.
    
        Returns:
            Normalized mapping containing all formatter-required keys.
    """
    ...
def make_legacy_split_evaluator(legacy_get_metrics: Callable[..., Any], **extra_kwargs: Any) -> Callable[[str, Any], Any]:
    """
    Wrap legacy ``get_metrics`` function into split-callback signature.
    
        Args:
            legacy_get_metrics: Legacy evaluator callable from older projects.
            model: Loaded model object passed through to legacy evaluator.
            index_to_labels: Mapping of class index to label names.
            runtime_framework: Optional runtime name forwarded to legacy evaluator.
            action_tracker: Optional tracker object forwarded to legacy evaluator.
            **extra_kwargs: Additional keyword arguments forwarded to evaluator.
    
        Returns:
            Callable with signature ``fn(split, loader) -> payload``.
    """
    ...
