"""GROM (Thunder) steering method constants."""
from wisent.core.utils.config_tools.constants.for_experiments.by_method._tecza import *  # noqa: F401,F403

# --- Core GROM parameters ---
GROM_NUM_DIRECTIONS = 5
GROM_OPTIMIZATION_STEPS = 200
GROM_LEARNING_RATE = 0.005
GROM_WARMUP_STEPS = 20
GROM_BEHAVIOR_WEIGHT = 1.0
GROM_RETAIN_WEIGHT = 0.2
GROM_SPARSE_WEIGHT = 0.05
GROM_SMOOTH_WEIGHT = 0.02
GROM_INDEPENDENCE_WEIGHT = 0.03
GROM_MAX_ALPHA = 3.0
GROM_GATE_TEMPERATURE = 0.5
GROM_MIN_COSINE_SIM = 0.2
GROM_MAX_COSINE_SIM = 0.9
GROM_LINEAR_THRESHOLD = 0.8
GROM_HIDDEN_DIM = 128
GROM_ROUTER_HIDDEN_DIM = 64
GROM_INTENSITY_HIDDEN_DIM = 32
GROM_ROUTER_TEMPERATURE = 0.5

# --- GROM search ranges ---
GROM_SEARCH_NUM_DIRECTIONS = (2, 3, 5)
GROM_SEARCH_STEERING_LAYERS = ("range_3", "range_5")
GROM_SEARCH_GATE_HIDDEN_DIMS = (32, 64, 128)
GROM_SEARCH_INTENSITY_HIDDEN_DIMS = (16, 32, 64)
GROM_SEARCH_OPT_STEPS = (100, 200)
GROM_SEARCH_BEHAVIOR_WEIGHTS = (0.5, 1.0)
GROM_SEARCH_RETAIN_WEIGHTS = (0.1, 0.2, 0.5)
GROM_SEARCH_SPARSE_WEIGHTS = (0.0, 0.05)
GROM_SEARCH_MAX_ALPHAS = (2.0, 3.0)

# --- GROM loss weights ---
GROM_LOSS_CONTRASTIVE_WEIGHT = 2.0
GROM_LOSS_UTILITY_WEIGHT = 0.5
GROM_LOSS_CONCENTRATION_WEIGHT = 0.3
GROM_LOSS_GATE_WARMUP_WEIGHT = 0.5
GROM_LOSS_CONTRASTIVE_MARGIN = 2.0
GROM_LOSS_CAA_ALIGNMENT_WEIGHT = 0.5

# --- GROM geometry adaptation ---
GROM_ADAPT_CONE_THRESHOLD = 0.7
GROM_ADAPT_MANIFOLD_THRESHOLD = 0.8
GROM_ADAPT_LINEAR_DIRECTIONS = 1
GROM_ADAPT_COMPLEX_DIRECTIONS = 5
GROM_ADAPT_MAX_DIRECTIONS = 7

# --- GROM network dimension bounds ---
GROM_GATE_DIM_MIN = 32
GROM_GATE_DIM_MAX = 512
GROM_GATE_DIM_DIVISOR = 16
GROM_INTENSITY_DIM_MIN = 16
GROM_INTENSITY_DIM_MAX = 256
GROM_INTENSITY_DIM_DIVISOR = 32

# --- GROM Optuna bounds ---
OPTUNA_GROM_GATE_DIM_MIN = 16
OPTUNA_GROM_GATE_DIM_MAX = 256
OPTUNA_GROM_INTENSITY_DIM_MIN = 8
OPTUNA_GROM_INTENSITY_DIM_MAX = 128
OPTUNA_GROM_SPARSE_WEIGHT_MIN = 0.0
OPTUNA_GROM_SPARSE_WEIGHT_MAX = 0.5

# --- GROM hierarchical/search ---
SEARCH_GROM_GATE_HIDDEN_DIMS = (32, 64)
SEARCH_GROM_INTENSITY_HIDDEN_DIMS = (16, 32)
HIERARCHICAL_GROM_DIRECTIONS = (3, 5, 8)
HIERARCHICAL_GROM_TEMPERATURES = (0.3, 0.5, 1.0)
GROM_STEERING_LAYER_CONFIGS = ("range_3", "range_5")
GROM_MAX_ALPHA_SEARCH = (2.0, 3.0, 5.0)
GROM_SPARSE_WEIGHT_OPTIONS = (0.0, 0.05, 0.1)

# --- GROM training ---
GROM_ETA_MIN_FACTOR = 0.1
GROM_MAX_GRAD_NORM = 1.0
GROM_CAA_ALIGNMENT_THRESHOLD = 0.9
GROM_ROUTING_TEMP_EPS = 0.1
GROM_CREATE_NOISE_SCALE = 0.3
GROM_CREATE_GATE_THRESHOLD = 0.5
GROM_CAA_SIMILARITY_SKIP = 0.9

# --- GROM parser/CLI defaults ---
GROM_DEFAULT_LAMBDA = 0.5
GROM_DEFAULT_LR = 0.1
GROM_DEFAULT_NUM_ITER = 5
GROM_GATING_SHRINK_FACTOR = 2
GROM_SENSOR_LAYER_DEFAULT = 15
GROM_SIGNIFICANT_DIRECTIONS_DEFAULT = 3

# --- GROM optimizer registry bounds ---
GROM_LR_UPPER = 0.05
GROM_RETAIN_UPPER = 0.3
GROM_SPARSE_UPPER = 0.2
GROM_BEHAVIOR_UPPER = 10.0
GROM_LAMBDA_UPPER = 2.0

# --- GROM test defaults ---
GROM_TEST_HIDDEN_DIM = 256
GROM_TEST_N_SAMPLES = 30

# --- GROM min pairs ---
MIN_PAIRS_GROM = 100
