cleanup(fflag): delete dead enable_action_masking chain — [FFLAG-013b]

The chain was: GpuDqnTrainer.enable_action_masking field (mod.rs:234) →
set via local `let enable_action_masking = true;` at constructor.rs:380
→ passed into GpuExperienceCollectorConfig.enable_action_masking at
training_loop.rs:1263. Zero conditional readers anywhere in cuda_pipeline
— the GPU kernel always filters invalid actions. Comment at
constructor.rs:379 says "action masking and entropy regularization
always active", confirming the flag is vestigial.

Deleted all 4 sites. Per user directive "no deferred tasks, solve
properly" — previously deferred as FFLAG-013b, now resolved.
This commit is contained in:
jgrusewski
2026-04-20 22:53:10 +02:00
parent 34b764a91d
commit e8eee1ed87
4 changed files with 2 additions and 10 deletions

View File

@@ -237,8 +237,6 @@ pub struct ExperienceCollectorConfig {
pub dsr_eta: f32,
/// N-step returns lookahead (1 = standard TD, 3-5 typical for Rainbow DQN)
pub n_steps: i32,
/// Enable action masking: filters invalid exposure actions in the GPU kernel.
pub enable_action_masking: bool,
/// Holding cost rate per bar per unit position. Continuous inventory penalty.
pub holding_cost_rate: f32,
/// Bars threshold for churn penalty. Trades within this window get graduated penalty.
@@ -370,7 +368,6 @@ impl Default for ExperienceCollectorConfig {
q_gap_threshold: 0.0,
dsr_eta: 0.01,
n_steps: 1,
enable_action_masking: false,
holding_cost_rate: 0.00000052, // ~0.52 bps / 100 bars
churn_threshold: 10.0,
churn_penalty_scale: 0.001,

View File

@@ -377,7 +377,6 @@ impl DQNTrainer {
};
// Wave 16 Portfolio Features: action masking and entropy regularization always active
let enable_action_masking = true;
let max_position = hyperparams.max_position_absolute; // BLOCKER #2: Use hyperopt-tunable position limit
// Entropy regularization: SAC-style computed directly on Q-values in DQN::compute_loss_internal
@@ -572,8 +571,7 @@ impl DQNTrainer {
training_sharpe_ema: 0.0,
training_sharpe_ema_initialized: false,
// Wave 16 Portfolio Features
enable_action_masking,
// Wave 16 Portfolio Features (action masking always active)
max_position,
current_epoch: 0,
multi_asset_portfolio,

View File

@@ -229,9 +229,7 @@ pub struct DQNTrainer {
/// Whether training_sharpe_ema has been initialized.
pub(crate) training_sharpe_ema_initialized: bool,
// Wave 16 Portfolio Features
/// Enable action masking (filters invalid actions before Q-value computation)
pub enable_action_masking: bool,
// Wave 16 Portfolio Features (action masking is always active).
/// Maximum position size for action masking (default: 2.0)
pub max_position: f64,
/// Current epoch (for Q-gap warm-up ramp)

View File

@@ -1260,7 +1260,6 @@ impl DQNTrainer {
epsilon,
gamma: self.hyperparams.gamma as f32,
max_position: self.max_position as f32,
enable_action_masking: self.enable_action_masking,
curiosity_scale: 1.0,
order_credit_weight: self.hyperparams.order_credit_weight as f32,
risk_efficiency_weight: self.hyperparams.risk_efficiency_weight as f32,