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

from .contracts import SplitEvaluatorProtocol
from .evaluator import evaluate_available_splits
from .exceptions import InferenceRunnerError, ModelLoadError
from .runtime_registry import RuntimeTaskRegistry
from .schemas import MetricPayload, validate_payload
from .status_handler import EvaluationStatusReporter

# Functions
def build_runtime_split_evaluator(registry: Any) -> Callable[[str, Any], Any]:
    """
    Create split evaluator using runtime registry and optional formatter.
    
        Args:
            registry: Task/runtime registry containing loaders and runners.
            action_tracker: Tracker object passed through for API compatibility.
            context: Evaluation context containing task, runtime, and split metadata.
            runner_kwargs: Extra keyword arguments for runner invocation.
            split_formatter: Optional formatter converting runner output to payload.
    
        Returns:
            Callable with signature ``fn(split, loader) -> MetricPayload``.
    """
    ...
def load_model_from_registry(registry: Any) -> Any:
    """
    Load model using task/runtime registry and raise typed errors.
    
        Args:
            registry: Task/runtime registry containing model loaders.
            action_tracker: Tracker-like object passed to loader implementation.
            task_type: Task identifier used to resolve loader namespace.
            runtime_framework: Runtime descriptor used to resolve loader variant.
    
        Returns:
            Loaded model artifact returned by resolved loader.
    """
    ...

# Classes
class EvalContext:
    # Runtime context consumed by orchestrators.

    ...
class EvaluationOrchestrator:
    # Execute split evaluation and payload normalization.

    def fail(self: Any, error: Any) -> None:
        """
        Report evaluation failure details to tracking facilities.
        
                Args:
                    error: Exception raised during evaluation flow.
        
                Returns:
                    None.
        """
        ...

    def persist(self: Any, payload: Any) -> None:
        """
        Persist successful payload and emit completion status.
        
                Args:
                    payload: Normalized metric payload to persist through tracker.
        
                Returns:
                    None.
        """
        ...

    def run(self: Any) -> Any:
        """
        Execute evaluation over available splits and normalize payload.
        
                Args:
                    None.
        
                Returns:
                    Normalized metric payload aggregated across requested splits.
        """
        ...

