fix(test): cap real_market_data() to 2000 bars for CI
The GPU forward tests also load full dataset via real_market_data(). Cap at 2000 bars across ALL smoke tests — validates functionality, not data volume. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -141,9 +141,10 @@ fn smoke_ohlcv_parse_and_extract_features() {
|
||||
// Single symbol for CI speed
|
||||
let Some(ohlcv_dir) = try_data("ohlcv/ES.FUT").or_else(|| try_data("ohlcv")) else { return };
|
||||
|
||||
// Load OHLCV bars from .dbn.zst
|
||||
let bars = ml::hyperopt::adapters::dbn_loader::load_bars_from_dbn_dir(&ohlcv_dir)
|
||||
// Load OHLCV bars from .dbn.zst (capped for CI speed)
|
||||
let mut bars = ml::hyperopt::adapters::dbn_loader::load_bars_from_dbn_dir(&ohlcv_dir)
|
||||
.expect("Failed to load OHLCV bars from DBN");
|
||||
if bars.len() > 2000 { bars.truncate(2000); }
|
||||
|
||||
info!(count = bars.len(), dir = %ohlcv_dir.display(), "Loaded OHLCV bars");
|
||||
assert!(bars.len() > 100, "Expected >100 bars, got {}", bars.len());
|
||||
@@ -429,10 +430,14 @@ mod gpu_smoke {
|
||||
mbp10_dir: Option<&Path>,
|
||||
stream: &Arc<CudaStream>,
|
||||
) -> Result<(CudaSlice<f32>, CudaSlice<f32>, usize), anyhow::Error> {
|
||||
// 1. Load OHLCV bars
|
||||
let bars = ml::hyperopt::adapters::dbn_loader::load_bars_from_dbn_dir(ohlcv_dir)
|
||||
// 1. Load OHLCV bars (capped for CI speed)
|
||||
const MAX_BARS_CI: usize = 2000;
|
||||
let mut bars = ml::hyperopt::adapters::dbn_loader::load_bars_from_dbn_dir(ohlcv_dir)
|
||||
.expect("Failed to load OHLCV bars");
|
||||
info!(count = bars.len(), "Loaded OHLCV bars");
|
||||
if bars.len() > MAX_BARS_CI {
|
||||
bars.truncate(MAX_BARS_CI);
|
||||
}
|
||||
info!(count = bars.len(), "Loaded OHLCV bars (capped to {})", MAX_BARS_CI);
|
||||
|
||||
// 2. Extract 42-dim features
|
||||
let features = ml::features::extract_ml_features(&bars)
|
||||
|
||||
Reference in New Issue
Block a user