cleanup(fflag): delete dead use_regime_conditioning flag — [FFLAG-009]
DQNConfig.use_regime_conditioning was declared, defaulted true at 3 construction sites, but never read anywhere in the workspace. Classic write-only flag (like use_different_seeds in DEAD-001). Deleted field + docstring + 3 assignment sites. Regime conditioning is already unconditional per the trainer — the flag was vestigial.
This commit is contained in:
@@ -187,13 +187,6 @@ pub struct DQNConfig {
|
||||
pub num_urgency_levels: usize,
|
||||
|
||||
/// Regime-conditional importance sampling for the branching loss path.
|
||||
/// When true, per-sample losses are scaled by regime-specific factors
|
||||
/// (Trending=1.2, Ranging=0.8, Volatile=0.6) derived from ADX/CUSUM
|
||||
/// features at state indices 40-41.
|
||||
/// Requires `state_dim` >= 42 to have effect; silently no-ops on smaller vectors.
|
||||
/// Default: true.
|
||||
pub use_regime_conditioning: bool,
|
||||
|
||||
/// Feature index for ADX(14) in the market feature vector.
|
||||
/// Default: 40 (position in the 42-dim feature layout).
|
||||
/// Must match the feature extraction pipeline.
|
||||
@@ -304,8 +297,6 @@ impl Default for DQNConfig {
|
||||
num_order_types: 3,
|
||||
num_urgency_levels: 3,
|
||||
|
||||
// Regime conditioning: Enabled by default (applies per-regime IS weights to loss)
|
||||
use_regime_conditioning: true,
|
||||
regime_adx_idx: 40,
|
||||
regime_cusum_idx: 41,
|
||||
regime_adx_threshold: 0.25,
|
||||
@@ -756,7 +747,6 @@ impl DQNConfig {
|
||||
branch_hidden_dim: 128,
|
||||
num_order_types: 3,
|
||||
num_urgency_levels: 3,
|
||||
use_regime_conditioning: true,
|
||||
regime_adx_idx: 40,
|
||||
regime_cusum_idx: 41,
|
||||
regime_adx_threshold: 0.25,
|
||||
|
||||
@@ -290,7 +290,6 @@ impl DQNTrainer {
|
||||
iqn_embedding_dim: 64, // Fixed (not in search space)
|
||||
iqn_lambda: hyperparams.iqn_lambda as f32, // IQN dual-head loss weight (f64->f32)
|
||||
branch_hidden_dim: hyperparams.branch_hidden_dim,
|
||||
use_regime_conditioning: true, // Always enable per-regime IS weights for branching loss
|
||||
cvar_alpha: hyperparams.cvar_alpha,
|
||||
|
||||
#[allow(clippy::cast_possible_truncation)]
|
||||
|
||||
Reference in New Issue
Block a user