fix(sp15-wave3b-followup): migrate evaluate_baseline.rs 3 GpuBacktestEvaluator::new sites — Wave 3b missed the example binary

Wave 3b (4320820ae) added a 6th window_lob_bars parameter to
GpuBacktestEvaluator::new and migrated 3 production lib call sites + 6
test call sites, but the lib-only `cargo check -p ml --features cuda`
validation didn't catch the 3 example-binary call sites in
evaluate_baseline.rs (lines 1344, 1641, 1802). Argo's ensure-binary
step compiles all 4 example binaries (hyperopt_baseline_rl,
train_baseline_rl, evaluate_baseline, precompute_features), and
evaluate_baseline failed with E0061 (wrong number of args).

This commit migrates all 3 sites to construct zero-OFI LobBar SoA
inline (eval-path lacks per-bar OFI features — same degradation
pattern as the PPO hyperopt adapter Wave 3b D4 resolution; OFI-impact
term degrades to 0 while commission + half-spread × position still
apply).

Validated: `cargo check -p ml --features cuda --all-targets` clean
(was --features cuda only before — now expanded to catch
example/test/bin compile-breaks).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
jgrusewski
2026-05-07 10:25:50 +02:00
parent c16b3b5a80
commit 81a9319d84

View File

@@ -1340,10 +1340,22 @@ fn evaluate_dqn_fold_gpu(
..Default::default()
};
// Single window = full test fold
// Single window = full test fold. Build zero-OFI LobBar SoA for the
// SP15 cost-net pipeline — eval-path lacks per-bar OFI features, so the
// OFI-impact term degrades to 0 (commission + half-spread × position
// still apply). Same degradation pattern as the PPO hyperopt adapter.
let lob_bars: Vec<ml::cuda_pipeline::lob_bar::LobBar> = prices
.iter()
.map(|ohlc| ml::cuda_pipeline::lob_bar::LobBar {
price: ohlc[3], // close
spread: gpu_config.spread_cost,
ofi: 0.0,
})
.collect();
let mut evaluator = GpuBacktestEvaluator::new(
&[prices],
&[features],
&[lob_bars],
market_feature_dim,
gpu_config,
&stream,
@@ -1638,9 +1650,19 @@ fn evaluate_ppo_fold_gpu(
..Default::default()
};
// Zero-OFI LobBar SoA — see DQN fold above for rationale.
let lob_bars: Vec<ml::cuda_pipeline::lob_bar::LobBar> = prices
.iter()
.map(|ohlc| ml::cuda_pipeline::lob_bar::LobBar {
price: ohlc[3],
spread: gpu_config.spread_cost,
ofi: 0.0,
})
.collect();
let mut evaluator = GpuBacktestEvaluator::new(
&[prices],
&[features],
&[lob_bars],
market_feature_dim,
gpu_config,
&ppo_stream,
@@ -1799,9 +1821,19 @@ fn evaluate_supervised_fold_gpu(
..Default::default()
};
// Zero-OFI LobBar SoA — see DQN fold above for rationale.
let lob_bars: Vec<ml::cuda_pipeline::lob_bar::LobBar> = prices
.iter()
.map(|ohlc| ml::cuda_pipeline::lob_bar::LobBar {
price: ohlc[3],
spread: gpu_config.spread_cost,
ofi: 0.0,
})
.collect();
let mut evaluator = GpuBacktestEvaluator::new(
&[prices],
&[features],
&[lob_bars],
market_feature_dim,
gpu_config,
&sup_stream,