fix(crt-train): migrate all PerceptionTrainerConfig literals to new smoothness_base_lambda field

Task 5 added smoothness_base_lambda to PerceptionTrainerConfig but only
updated the struct definition + Default impl. Eight test sites in
perception_overfit.rs and one site in alpha_train.rs construct the
config via explicit field list (no ..Default::default() spread), so
they broke with E0063 missing-field errors under cargo check
--all-targets.

Per feedback_no_partial_refactor.md: when a contract changes, every
consumer migrates atomically. This commit adds smoothness_base_lambda:
0.0 to all 9 sites so the workspace compiles cleanly. The
alpha_train.rs value of 0.0 is a placeholder — Task 7 will replace it
with cli.smoothness_base_lambda once the CLI flag is added.
This commit is contained in:
jgrusewski
2026-05-20 23:40:45 +02:00
parent b83c14cf44
commit 4a32186a5f
2 changed files with 9 additions and 0 deletions

View File

@@ -261,6 +261,7 @@ fn main() -> Result<()> {
seed: cli.seed,
horizon_weights,
n_batch: cli.batch_size,
smoothness_base_lambda: 0.0,
};
let mut trainer = PerceptionTrainer::new(&dev, &trainer_cfg).context("trainer init")?;

View File

@@ -72,6 +72,7 @@ fn stacked_trainer_loss_shrinks_on_constant_signal() {
seed: 0x4242,
horizon_weights: [1.0; 5],
n_batch: 1,
smoothness_base_lambda: 0.0,
};
let mut trainer = PerceptionTrainer::new(&dev, &cfg).expect("init");
@@ -145,6 +146,7 @@ fn stacked_trainer_loss_shrinks_with_stride_4() {
seed: 0xC4C4,
horizon_weights: [1.0; 5],
n_batch: 1,
smoothness_base_lambda: 0.0,
};
let mut trainer = PerceptionTrainer::new(&dev, &cfg).expect("init");
@@ -198,6 +200,7 @@ fn stacked_trainer_loss_shrinks_at_batch_32() {
seed: 0xB32B,
horizon_weights: [1.0; 5],
n_batch: 32,
smoothness_base_lambda: 0.0,
};
let mut trainer = PerceptionTrainer::new(&dev, &cfg).expect("init");
@@ -295,6 +298,7 @@ fn evaluate_alone_succeeds() {
seed: 0x6262,
horizon_weights: [1.0; 5],
n_batch: 1,
smoothness_base_lambda: 0.0,
};
let mut trainer = PerceptionTrainer::new(&dev, &cfg).expect("init");
let ts = 1_000_000u64;
@@ -322,6 +326,7 @@ fn evaluate_works_after_captured_training_step() {
seed: 0x5151,
horizon_weights: [1.0; 5],
n_batch: 1,
smoothness_base_lambda: 0.0,
};
let mut trainer = PerceptionTrainer::new(&dev, &cfg).expect("init");
@@ -356,6 +361,7 @@ fn evaluate_works_after_capture_no_replay() {
seed: 0x8181,
horizon_weights: [1.0; 5],
n_batch: 1,
smoothness_base_lambda: 0.0,
};
let mut trainer = PerceptionTrainer::new(&dev, &cfg).expect("init");
let ts = 1_000_000u64;
@@ -385,6 +391,7 @@ fn horizon_ema_and_lambda_track_after_training() {
seed: 0x9292,
horizon_weights: [1.0; 5],
n_batch: 1,
smoothness_base_lambda: 0.0,
};
let mut trainer = PerceptionTrainer::new(&dev, &cfg).expect("init");
@@ -440,6 +447,7 @@ fn evaluate_works_after_warmup_only() {
seed: 0x7171,
horizon_weights: [1.0; 5],
n_batch: 1,
smoothness_base_lambda: 0.0,
};
let mut trainer = PerceptionTrainer::new(&dev, &cfg).expect("init");
let ts = 1_000_000u64;