"""Arbitrary constants. Migrated from _constants_part8.py."""

from wisent.core.grp_05.sub_constants.arbitrary.sub_arb.sub_arb2 import *  # noqa: F401,F403

# --- Marketplace helpers ---
MARKETPLACE_BASE_TRAINING_TIME = 8.0
MARKETPLACE_PER_BENCHMARK_TIME = 2.0
MARKETPLACE_SYNTHETIC_TRAINING_TIME = 6.0
MARKETPLACE_SYNTHETIC_SAMPLES = 50
MARKETPLACE_DEFAULT_OPTIMAL_LAYER = 14
MARKETPLACE_MAX_TASKS_TO_SEARCH = 1000
MARKETPLACE_MAX_RELEVANT_BENCHMARKS = 30
MARKETPLACE_MAX_RELEVANT_TO_RETURN = 15
MARKETPLACE_MAX_SIMILARITY_SCORE = 10.0
MARKETPLACE_LAYER_MIN = 8
MARKETPLACE_LAYER_MAX = 20
MARKETPLACE_CONFIDENCE_WITH_BENCHMARKS = 0.8
MARKETPLACE_CONFIDENCE_WITHOUT_BENCHMARKS = 0.6
MARKETPLACE_CUDA_SPEED_MULTIPLIER = 0.3
MARKETPLACE_MPS_SPEED_MULTIPLIER = 0.5
MARKETPLACE_MAX_TASKS_DEFAULT = 10
# --- Synthetic system costs ---
AGENT_SYNTH_TRAIT_DISCOVERY_COST_S = 10.0
AGENT_SYNTH_DATA_GEN_COST_PER_PAIR_S = 30.0
AGENT_SYNTH_CLASSIFIER_TRAINING_COST_S = 180.0
AGENT_SYNTH_PAIRS_PER_TRAIT = 12
AGENT_SYNTH_DEFAULT_PAIRS = 15
# --- Device benchmark defaults ---
AGENT_BENCH_EVAL_DEFAULT_SECONDS = 60.0
AGENT_CLASSIFIER_TRAINING_DEFAULT_SECONDS = 600.0
# --- Classifier scoring weights ---
CLASSIFIER_SCORE_DIRECT_MATCH = 5.0
CLASSIFIER_SCORE_EXACT_CONCEPT = 4.0
CLASSIFIER_SCORE_PARTIAL_CONCEPT = 2.0
CLASSIFIER_SCORE_SEMANTIC_SIMILAR = 1.5
CLASSIFIER_SCORE_TOKEN_EXACT = 3.0
CLASSIFIER_SCORE_TOKEN_SUBSTRING = 1.0
CLASSIFIER_SCORE_TOKEN_SEMANTIC = 0.5
CLASSIFIER_SIMILARITY_CHAR_THRESHOLD = 0.6
CLASSIFIER_SIMILARITY_AFFIX_THRESHOLD = 0.4
CLASSIFIER_SIMILARITY_AFFIX_MIN_LEN = 3
CLASSIFIER_NAME_LENGTH_MIN = 8
CLASSIFIER_NAME_LENGTH_MAX = 25
CLASSIFIER_QUALITY_GOOD_LENGTH = 2.0
CLASSIFIER_QUALITY_SHORT_NAME = 0.5
CLASSIFIER_QUALITY_LONG_NAME = 1.0
CLASSIFIER_PARTS_OPTIMAL_MIN = 2
CLASSIFIER_PARTS_OPTIMAL_MAX = 3
CLASSIFIER_QUALITY_OPTIMAL_PARTS = 2.0
CLASSIFIER_QUALITY_SINGLE_PART = 1.5
CLASSIFIER_QUALITY_MANY_PARTS = 0.5
CLASSIFIER_PENALTY_EXPERIMENTAL = 1.0
CLASSIFIER_BONUS_DOMAIN_DIVERSITY = 0.5
# --- Classifier benchmark ---
CLASSIFIER_BENCHMARK_SAMPLES = 50
SELECT_MAX_CLASSIFIERS = 10
TASK_RELEVANCE_MAX_RESULTS = 20
TASK_SELECTOR_MAX_TASKS = 10
# --- Cache configuration ---
CACHE_CHUNK_SIZE = 25
CACHE_MAX_AGE_DAYS = 30
# --- Layer threshold patterns (model size) ---
LAYER_THRESHOLD_SMALL = 16
LAYER_THRESHOLD_MEDIUM = 32
LAYER_THRESHOLD_LARGE = 48
# --- HTTP request timeouts ---
HTTP_TIMEOUT_SHORT = 10
HTTP_TIMEOUT_MEDIUM = 30
HTTP_TIMEOUT_LONG = 60
SUBPROCESS_EXEC_TIMEOUT = 10
# --- GPTZero detector ---
GPTZERO_MIN_TEXT_LENGTH = 50
GPTZERO_DEFAULT_NEUTRAL_SCORE = 0.5
GPTZERO_AI_PROB_WEIGHT = 0.7
GPTZERO_AVG_PROB_WEIGHT = 0.3
# --- Generation evaluator ---
GEN_EVAL_HIGH_CONFIDENCE = 0.9
# --- Gibberish generation ranges ---
GIBBERISH_WORD_COUNT_MIN = 10
GIBBERISH_WORD_COUNT_MAX = 30
GIBBERISH_WORD_LEN_MIN = 3
GIBBERISH_WORD_LEN_MAX = 12
GIBBERISH_LINE_COUNT_MIN = 3
GIBBERISH_LINE_COUNT_MAX = 8
# --- Perturbation ranges ---
PERTURB_UP_MIN = 1.1
PERTURB_UP_MAX = 1.5
PERTURB_DOWN_MIN = 0.5
PERTURB_DOWN_MAX = 0.9
YEAR_SHIFT_MIN = -50
YEAR_SHIFT_MAX = 50
YEAR_SHIFT_DEFAULT = 10
SMALL_NUM_INCREMENT_MIN = 1
SMALL_NUM_INCREMENT_MAX = 5
NUM_PERTURB_SCALE_MIN = 0.5
NUM_PERTURB_SCALE_MAX = 1.5
YEAR_PERTURB_LARGE = 10
YEAR_PERTURB_SMALL = 5
# --- HaluLens content thresholds ---
HALULENS_MIN_CONTENT_LENGTH = 200
HALULENS_SENT_LEN_MIN = 30
HALULENS_SENT_LEN_MAX = 300
# --- STSB score ---
STSB_SCORE_NEUTRAL = 0.1
# --- SimpleQA thresholds ---
SIMPLEQA_MIN_CHAR_LENGTH = 3
SIMPLEQA_MAX_ANSWER_LENGTH = 50
# --- C4 text thresholds ---
C4_MIN_TEXT_LENGTH = 50
# --- Paloma text chunking ---
PALOMA_DOCS_DIVISOR = 4
PALOMA_MIN_TEXT_LENGTH = 200
PALOMA_CHUNK_SIZE_WORDS = 200
PALOMA_TARGET_PAIRS_PER_DOC = 4
PALOMA_MIN_CHUNK_WORDS = 50
PALOMA_MAX_WORDS = 200
PALOMA_MAX_CHARS = 1000
PALOMA_MIN_WORDS = 10
# --- Translation shuffle attempts ---
TRANSLATION_MAX_SHUFFLE_ATTEMPTS = 10
# --- Math parsing ---
MATH_SHORT_VAR_MAX_LEN = 2
# --- Bias detection ---
BIAS_LIBERAL_THRESHOLD = 3
# --- RoBERTa API ---
ROBERTA_API_DEFAULT_WAIT_TIME = 20
ROBERTA_API_MAX_WAIT_TIME = 30
# --- Method training layer range ---
DEFAULT_METHOD_LAYER_RANGE_END = 37
# --- Docker container resource limits ---
DOCKER_BIGCODE_MEM_LIMIT_MB = 256
DOCKER_CPU_QUOTA_50PCT_US = 50000
DOCKER_CODE_EXEC_TIMEOUT_SECS = 300
# --- Device benchmark timeouts ---
DEVICE_BENCH_TIMEOUT_SECS = 120
GPU_TEST_TIMEOUT_SECS = 1200
SUBPROCESS_TIMEOUT_SECS = 300
BENCHMARK_TEST_TIMEOUT_SECS = 1200
# --- Visualization DPI ---
VIZ_DPI_STANDARD = 120
VIZ_DPI_LOW = 100
# --- Visualization marker sizes ---
VIZ_CENTROID_MARKER_SIZE = 200
VIZ_CENTROID_MARKER_SIZE_ALT = 150
VIZ_X_MARKER_SIZE = 100
VIZ_HEATMAP_ASTERISK_SIZE = 200
# --- Visualization figure dimensions ---
VIZ_FIGURE_WIDTH_PX = 1000
VIZ_FIGURE_HEIGHT_PX = 800
VIZ_LEGEND_Y_TOP = 0.99
# --- Visualization histogram bins ---
VIZ_HISTOGRAM_BINS_20 = 20
# --- Visualization scale factors ---
VIZ_MIN_SCALE = 0.1
VIZ_SCALE_PADDING = 0.8
# --- Optuna pruning ---
OPTUNA_PRUNE_ACCURACY_THRESHOLD = 0.35
# --- Classifier cache ---
LAYER_CACHE_DECAY_DENOMINATOR = 10.0
LAYER_CACHE_MIN_SCORE = 0.1
# --- Classifier bonus ---
CLASSIFIER_BONUS_MAX = 0.2
CLASSIFIER_BONUS_SAMPLE_DENOM = 1000
# --- NLI evaluator ---
NLI_ENTAILMENT_THRESHOLD = 0.45
# --- Coherence evaluator ---
COHERENCE_RATIO_THRESHOLD = 0.5
# --- Accuracy margin ---
STABILITY_ACCURACY_MARGIN = 0.1
# --- Nonsense generator character probabilities ---
NONSENSE_LOWERCASE_PROB = 0.7
NONSENSE_SPACE_PROB = 0.9
# --- TETNO condition vector optimization ---
TETNO_CONDITION_VEC_OPT_ITERS = 50
# --- Database cursor ---
DB_CURSOR_ITERSIZE = 500
# --- Generate responses min load ---
MIN_LOAD_LIMIT_QUESTIONS = 20
# --- QA parser lookahead ---
QA_PARSER_LOOKAHEAD_LINES = 10
# --- Nonsense generator ranges ---
NONSENSE_CHAR_LEN_MIN = 20
NONSENSE_CHAR_LEN_MAX = 50
NONSENSE_WORD_FILTER_MAX_LEN = 15
NONSENSE_REPETITION_MIN = 10
NONSENSE_REPETITION_MAX = 30
NONSENSE_WORD_SALAD_MIN = 3
NONSENSE_WORD_SALAD_MAX = 10
NONSENSE_MIXED_COMPONENTS_MIN = 2
NONSENSE_MIXED_COMPONENTS_MAX = 4
NONSENSE_MIXED_CHAR_LEN_MIN = 5
NONSENSE_MIXED_CHAR_LEN_MAX = 15
NONSENSE_MIXED_REPS_MIN = 3
NONSENSE_MIXED_REPS_MAX = 6
NONSENSE_MIXED_WORDS_MIN = 3
NONSENSE_MIXED_WORDS_MAX = 6
# --- Basic metrics ---
PERCENTILE_P10 = 10
PERCENTILE_P25 = 25
PERCENTILE_P75 = 75
PERCENTILE_P90 = 90
ALIGNMENT_HIGH_THRESHOLD = 0.5
METRICS_TOP_INDICES_LIMIT = 20
METRICS_THRESHOLD_FRACTION_DEFAULT = 0.01
CUMSUM_THRESHOLD_50 = 0.5
CUMSUM_THRESHOLD_90 = 0.9
CUMSUM_THRESHOLD_99 = 0.99
# --- Steerability ---
STEERABILITY_MIN_PAIRS = 5
# --- ChartQA perturbation ---
CHARTQA_PCT_DELTAS = (-30, -20, -10, 10, 20, 30)
CHARTQA_INT_DELTAS = (-5, -3, -2, -1, 1, 2, 3, 5)
CHARTQA_DECIMAL_DELTAS = (-0.2, -0.15, -0.1, -0.05, 0.05, 0.1, 0.15, 0.2)
# --- GSM8K extractor ---
GSM8K_DEFAULT_LIMIT = 500
GSM8K_PERTURBATION_MIN = 1
GSM8K_PERTURBATION_MAX = 10
# --- Distractor generation ---
DISTRACTOR_NEARBY_MIN = 2
DISTRACTOR_NEARBY_MAX = 10
DISTRACTOR_MAX_COUNT = 3
# --- Frames extractor ---
FRAMES_NUMERIC_DELTA_LARGE = 100
FRAMES_NUMERIC_DELTA_MEDIUM = 50
FRAMES_NUMERIC_DELTA_SMALL = 10
FRAMES_NUMERIC_DELTA_TINY = 5
FRAMES_SHORT_ANSWER_THRESHOLD = 100
FRAMES_ALT_ANSWER_LENGTH = 20
# --- Linearity layer sampling ---
LINEARITY_LAYER_SAMPLING_DIVISOR = 8

# --- Paper-derived defaults (arbitrary choices by paper authors) ---
LORA_DEFAULT_R = 16
LORA_DEFAULT_ALPHA = 32
DPO_DEFAULT_BETA = 0.1

# --- Convention-derived defaults (arbitrary choices) ---
JSON_INDENT = 2
DEFAULT_VIDEO_FPS = 30.0
JAVA_INDENT_SPACES = 4
GEO_DEFAULT_DIRECTION_ANGLE = 90.0

# --- Gemma BOS features ---
GEMMA_2B_BOS_FEATURES_PAPER = (11087, 3220, 11752, 12160, 11498)
GEMMA_2B_BOS_FEATURES_DETECTED = (
    1041, 7507, 11087, 3220, 11767, 11752,
    14669, 6889, 12160, 13700, 2747, 11498,
)
GEMMA_9B_BOS_FEATURES_DETECTED = (
    8032, 11906, 7768, 14845, 14483, 10562,
    8892, 9151, 5721, 15738, 5285, 13895,
)
