"""Auto-generated from octomil-contracts. Do not edit."""

from enum import Enum


class TrainingJobState(str, Enum):
    NEW = "new"
    """Job record created; not yet evaluated for eligibility."""
    ELIGIBLE = "eligible"
    """Job passed eligibility checks and can be scheduled."""
    QUEUED = "queued"
    """Job is in the scheduler queue waiting for resources."""
    PREPARING_DATA = "preparing_data"
    """Server is preparing data shards or generating training plans."""
    WAITING_FOR_RESOURCES = "waiting_for_resources"
    """Waiting for minimum device participation threshold."""
    TRAINING = "training"
    """Active federated round(s) are in progress on devices."""
    CHECKPOINTING = "checkpointing"
    """Aggregated weights are being checkpointed server-side."""
    EVALUATING = "evaluating"
    """Candidate model is being evaluated against held-out metrics."""
    CANDIDATE_READY = "candidate_ready"
    """Evaluation passed; candidate model is ready for staged rollout."""
    STAGED = "staged"
    """Candidate model staged for progressive activation rollout."""
    ACTIVATING = "activating"
    """Rollout is in progress; some devices are serving the new model."""
    ACTIVE = "active"
    """New model is fully activated and serving all eligible devices."""
    COMPLETED = "completed"
    """Training job completed successfully; final artifact published."""
    BLOCKED_POLICY = "blocked_policy"
    """Job blocked by an operator policy rule (e.g., jurisdiction, opt-out threshold)."""
    PAUSED = "paused"
    """Job paused by operator action; can be resumed."""
    FAILED_RETRYABLE = "failed_retryable"
    """Transient failure (e.g., aggregation error); job will be retried."""
    FAILED_FATAL = "failed_fatal"
    """Unrecoverable failure; job must be re-created."""
    REJECTED = "rejected"
    """Job rejected at submission (e.g., invalid config, policy violation)."""
    ROLLBACK = "rollback"
    """Activated model reverted to previous version due to regression."""
    SUPERSEDED = "superseded"
    """Job replaced by a newer training job before completion."""
