cleanup(fflag): delete dead enable_causal_intervention chain — [FFLAG-011]
Write-only flag chain: DqnTrainerConfig.enable_causal_intervention → local causal_enabled → CausalInterventionConfig.enabled. Zero readers anywhere — causal intervention buffers are unconditionally allocated per the existing "ALWAYS allocated (one production path)" comment. Deleted all three sites + 2 construction setters. Weight/interval/ market_dim fields retained (those are read).
This commit is contained in:
@@ -300,8 +300,6 @@ pub struct GpuDqnTrainConfig {
|
||||
pub ensemble_disagreement_penalty: f32,
|
||||
/// #21 Stochastic depth drop probability. 0.0 = disabled, 0.2 = 20% drop per layer.
|
||||
pub stochastic_depth_prob: f32,
|
||||
/// #34 Enable causal intervention training.
|
||||
pub enable_causal_intervention: bool,
|
||||
/// #34 Causal regularization weight.
|
||||
pub causal_weight: f64,
|
||||
/// #34 Run causal intervention every N training steps.
|
||||
@@ -365,7 +363,6 @@ impl Default for GpuDqnTrainConfig {
|
||||
stochastic_depth_prob: 0.0,
|
||||
pruning_epoch: 50,
|
||||
pruning_fraction: 0.7,
|
||||
enable_causal_intervention: true, // always on
|
||||
causal_weight: 0.1,
|
||||
causal_intervention_interval: 50,
|
||||
enable_gradient_vaccine: true, // always on
|
||||
@@ -429,7 +426,6 @@ pub struct FusedTrainScalars {
|
||||
/// #34 Causal intervention configuration.
|
||||
#[derive(Clone)]
|
||||
pub(crate) struct CausalInterventionConfig {
|
||||
pub enabled: bool,
|
||||
pub weight: f32,
|
||||
pub interval: usize,
|
||||
pub market_dim: usize,
|
||||
@@ -437,7 +433,7 @@ pub(crate) struct CausalInterventionConfig {
|
||||
|
||||
impl Default for CausalInterventionConfig {
|
||||
fn default() -> Self {
|
||||
Self { enabled: false, weight: 0.0, interval: 10, market_dim: 42 } // market_dim overridden at construction
|
||||
Self { weight: 0.0, interval: 10, market_dim: 42 } // market_dim overridden at construction
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6361,8 +6357,7 @@ impl GpuDqnTrainer {
|
||||
}
|
||||
};
|
||||
|
||||
// #34 Causal intervention buffers
|
||||
let causal_enabled = config.enable_causal_intervention;
|
||||
// #34 Causal intervention buffers (always enabled — one production path)
|
||||
let causal_market_dim = config.market_dim;
|
||||
let causal_wt = config.causal_weight as f32;
|
||||
let causal_intv = config.causal_intervention_interval;
|
||||
@@ -7467,7 +7462,6 @@ impl GpuDqnTrainer {
|
||||
causal_mean_reduce_kernel: causal_mean_reduce_kernel_fn,
|
||||
causal_mean_scratch,
|
||||
causal_config: CausalInterventionConfig {
|
||||
enabled: causal_enabled,
|
||||
weight: causal_wt,
|
||||
interval: causal_intv,
|
||||
market_dim: causal_market_dim,
|
||||
|
||||
@@ -403,7 +403,6 @@ impl FusedTrainingCtx {
|
||||
stochastic_depth_prob: hyperparams.stochastic_depth_prob as f32,
|
||||
pruning_epoch: hyperparams.pruning_epoch,
|
||||
pruning_fraction: hyperparams.pruning_fraction as f32,
|
||||
enable_causal_intervention: true,
|
||||
causal_weight: hyperparams.causal_weight,
|
||||
causal_intervention_interval: hyperparams.causal_intervention_interval,
|
||||
enable_gradient_vaccine: true,
|
||||
|
||||
Reference in New Issue
Block a user