"""Infrastructure constants: timeouts, retries, batch sizes, caching, logging."""
from wisent.core.constant_definitions.cannot_be_optimized._benchmark_data import *  # noqa: F401,F403

# --- Core defaults ---
DEFAULT_RANDOM_SEED = 42
DEFAULT_LIMIT = 100
DEFAULT_SHOW_COMPARISONS = 0
DEFAULT_SCALE_FACTOR = 1.0
SPLIT_RATIO_FULL = 1.0
N_JOBS_SINGLE = 1
# --- Batch sizes ---
CLASSIFIER_BATCH_SIZE = 32
BATCH_SIZE_CAP = 32
COMPARISON_MAX_BATCH_SIZE = 8
COMPARISON_TRAINING_BATCH_SIZE = 2
COMPARISON_DEFAULT_BATCH_SIZE = 1
STEERING_OPTI_BATCH_SIZE = 16
EXTRACTION_RAW_BATCH_SIZE = 5
EXTRACTION_SMALL_BATCH_SIZE = 10
SAE_BATCH_SIZE_DEFAULT = 64
# --- Timeouts ---
HTTP_TIMEOUT_MEDIUM = 30
HTTP_TIMEOUT_LONG = 60
DEFAULT_TIMEOUT_DOCKER = 30
DEFAULT_TIMEOUT_SHORT = 10
DEFAULT_TIMEOUT_QUICK = 5
DEFAULT_TIMEOUT_MATH_SCRIPT = 1
SUBPROCESS_TIMEOUT_SHORT = 5
BIGCODE_TEST_TIMEOUT = 10
ROBERTA_API_DEFAULT_WAIT_TIME = 20
ROBERTA_API_MAX_WAIT_TIME = 30
# --- Retries ---
MAX_REGENERATION_ATTEMPTS = 3
DEFAULT_MAX_RETRIES = 3
DEFAULT_API_RETRIES = 3
REFUSAL_CLEANER_MAX_RETRIES = 2
DEFAULT_RETRY_DELAY = 1.0
MAX_RECURSION_DEPTH = 3
# --- Cache ---
KEEP_RECENT_HOURS_DEFAULT = 24.0
CACHE_CHUNK_SIZE = 25
CACHE_MAX_AGE_DAYS = 30
CACHE_MAX_SIZE_GB_DEFAULT = 5.0
CACHE_MAX_AGE_DAYS_DEFAULT = 30.0
CACHE_MEMORY_SIZE_DEFAULT = 10
# --- Database ---
DB_CONNECTION_MAX_RETRIES = 5
DB_CURSOR_ITERSIZE = 500
DB_CONNECT_WAIT_S = 30
DB_TEXT_FIELD_MAX_LENGTH = 65000
# --- HuggingFace upload retry ---
HF_UPLOAD_MAX_RETRIES = 8
HF_UPLOAD_BASE_WAIT = 120
HF_UPLOAD_BACKOFF_MAX_EXPONENT = 3
HF_UPLOAD_JITTER_MIN = 0.5
HF_UPLOAD_JITTER_MAX = 1.5
HF_UPLOAD_RETRYABLE_PATTERNS = (
    "429", "412", "500", "502", "503", "504", "404",
    "Precondition", "ReadTimeout", "timed out", "Internal",
    "RevisionNotFound", "Invalid rev id", "Entry Not Found",
    "Gateway", "EntryNotFound", "RemoteEntryNotFound",
    "does not exist on",
)
# --- Docker / sandbox ---
FEEDBACK_MAX_CHARS = 2000
SAFE_DOCKER_FSIZE_MB = 10
SAFE_DOCKER_NOFILE = 128
DOCKER_CPU_QUOTA_50PCT_US = 50000
# --- Logging intervals ---
TECZA_LOGGING_INTERVAL = 10
TETNO_CONDITION_LOGGING_INTERVAL = 20
GROM_CREATE_LOG_INTERVAL = 50
TRAINING_LOG_INTERVAL = 20
TRAINING_LOG_FREQUENCY = 10
COMPARISON_LOGGING_STEPS = 10
PROGRESS_LOG_INTERVAL = 50
PROGRESS_REPORT_INTERVAL = 10
PROGRESS_CALLBACK_THRESHOLD = 100
# --- Agent ---
AGENT_MAX_WORKERS = 4
AGENT_CLASSIFIER_EPOCHS = 50
AGENT_TIMEOUT_CHECK_INTERVAL = 10
AGENT_RETRY_ATTEMPTS = 2
MAX_TASKS_TO_PROCESS = 5
# --- Multimodal ---
VIDEO_KEYFRAME_INTERVAL = 4
VIDEO_NUM_FRAMES = 16
VIDEO_FRAME_SAMPLE_RATE = 4
DEFAULT_VIDEO_FPS = 30.0
# --- Statistical testing ---
N_BOOTSTRAP = 10
# --- Continual learning ---
REPLAY_BUFFER_MAX_SIZE = 200
# --- Data loading ---
DATA_LOAD_LIMIT = 200
DATA_CHUNK_SIZE = 50
MIN_LOAD_LIMIT_QUESTIONS = 20
QA_PARSER_LOOKAHEAD_LINES = 10
# --- Timing ---
TIMING_SAMPLES_PER_TASK = 1000
TRACKING_SAMPLING_INTERVAL = 0.1
BENCHMARK_LOADING_TIME_DEFAULT = 60.0
# --- Pairs generation ---
PAIRS_NUM_PAIRS = 100
PAIRS_MIN_LENGTH = 100
PAIRS_MAX_LENGTH = 500
MAX_INCORRECT_PER_CORRECT = 2
ENRICHMENT_MAX_PAIRS = 50
# --- Geometry search ---
GEO_PAIRS_PER_BENCHMARK = 50
GEO_MAX_LAYER_COMBO_SIZE = 3
GEO_ESTIMATED_TIME_PER_EXTRACTION = 120.0
GEO_DEFAULT_DIRECTION_ANGLE = 90.0
MAX_COMBINATIONS = 1000
MAX_DEPTH = 3
# --- Evidence train/test split ---
EVIDENCE_TRAIN_SPLIT_NUM = 2
EVIDENCE_TRAIN_SPLIT_DEN = 3
# --- Parser defaults ---
PARSER_DEFAULT_LAYER_START = 0
PARSER_DEFAULT_WORKERS = 4
# --- Monitor ---
MONITOR_DEFAULT_INTERVAL = 1.0
MONITOR_DEFAULT_DURATION = 60
# --- Priority scoring ---
PRIORITY_HIGH = 3
PRIORITY_MEDIUM = 2
PRIORITY_LOW = 1
# --- Convention defaults ---
JSON_INDENT = 2
JAVA_INDENT_SPACES = 4
# --- Gradient accumulation ---
GRADIENT_ACCUMULATION_STEPS_DEFAULT = 1
# --- Limits ---
MAX_BENCHMARKS_SINGLE = 1
JSON_ARRAY_LIMIT = 100
ARCHITECTURE_MODULE_LIMIT = 50
MIN_CHOICES_VALIDATION = 2
TEST_MAX_COMBO_SIZE = 3
CONCEPT_NAMING_N_SAMPLES = 5
MAX_TASKS_PER_PROC = 1024
DIAGNOSTICS_TOTAL_CHECKS = 4
# --- Weight modification ---
WEIGHT_MOD_DEFAULT_COMPONENTS = ("self_attn.o_proj", "mlp.down_proj")
# --- Token limits ---
MAX_NEW_TOKENS_VERIFY_SINGLE = 1
STEERING_OPTI_JUDGE_MAX_TOKENS = 8
AUDIO_WHISPER_MAX_TOKENS = 448
# --- Thresholds ---
SCORE_MIDPOINT_PCT = 50
GEOMETRY_MINORITY_PCT = 30
PERSONALIZATION_GOOD_THRESHOLD = 70
BENCHMARK_FAST_LOAD_THRESHOLD = 50
ANGLE_DEVIATION_DEGREES_THRESHOLD = 60
PACMAP_PCA_DIM_THRESHOLD = 50
# --- Text length minimums ---
MIN_PAGE_TEXT_LENGTH = 50
MIN_RESPONSE_TEXT_LENGTH = 50
MIN_SENTENCE_LENGTH = 20
CONTEXT_MAX_LENGTH = 1500
DETECTOR_MAX_TEXT_LENGTH = 2000
# --- Task/search limits ---
TASK_SEARCH_LIMIT = 100
TASK_SELECTOR_LIMIT = 50
TRAIT_LABEL_MAX_LENGTH = 20
TRAIT_NAME_MAX_LENGTH = 30
# --- Clustering/layers ---
MIN_CLUSTERS = 2
LAYER_STRIDE_DEFAULT = 2
LAYER_RANGE_SMALL_OFFSET = 2
LAYER_RANGE_LARGE_OFFSET = 3
