jgrusewski
6ba52425ea
feat(infra): Argo workflow templates, drop cuDNN, GPU hotpath fixes
...
- Add compile-and-deploy, train-dqn/ppo/supervised WorkflowTemplates
- Add Argo Events (EventSource, Sensor, Service) for webhook triggers
- Add NetworkPolicy for compile-and-deploy pods (MinIO/DNS/API egress)
- Add convenience scripts: argo-compile-deploy.sh, argo-train.sh
- Drop cuDNN feature flags from all 9 ML crates (zero conv ops in codebase)
- Switch training runtime base to nvidia/cuda:12.9.1-runtime (saves ~800MB)
- Delete unused selective_scan.cu (16KB, zero Rust callers)
- Fix GPU hotpath violations in ml-core (NVTX, gradient utils, capabilities)
- Fix clippy warnings in ml-dqn (VarMap backticks, const fn)
- Add DQN GPU smoketest, backtest evaluator signal adapter fixes
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
2026-03-12 01:44:03 +01:00
jgrusewski
d06c99b0e1
fix(clippy): achieve zero warnings across entire workspace
...
- Fix format_push_string: write!() instead of push_str(&format!()) (25 sites)
- Fix str_to_string: .to_owned() instead of .to_string() on &str (6 sites)
- Fix unseparated_literal_suffix: add _ separator (6 sites)
- Fix multiple_inherent_impl: merge split impl blocks in TGGN, TFT, OFI (3)
- Fix else_if_without_else: add exhaustive else clauses (3 sites)
- Fix if_then_some_else_none: use .then().transpose() (1 site)
- Fix unwrap_in_result: replace expect() with match + ? (2 sites)
- Fix wildcard_enum_match_arm: enumerate Storage variants explicitly (2)
- Fix decimal_literal_representation: use hex for power-of-2 constants (5)
- Fix rc_buffer: Arc<Vec<T>> → Arc<[T]> for OFI features
- Fix needless_range_loop: convert to iterator patterns (17 sites)
- Fix used_underscore_binding: remove prefix on used vars (6 sites)
- Fix doc list item indentation (7 sites)
- Allow too_many_arguments on ML training functions (4)
- Allow multiple_unsafe_ops_per_block on CUDA FFI functions (3)
- Allow upper_case_acronyms on SLSTM/MLSTM model names (2)
- Add ML-crate pedantic allows: shadow, similar_names, type_complexity,
indexing_slicing, partial_pub_fields, non_ascii_literal, same_name_method
(following existing ml-labeling/ml-universe pattern)
Result: cargo clippy --workspace -- -D warnings passes with zero warnings.
All 2758+ lib tests pass (2 pre-existing backtesting failures unchanged).
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
2026-03-10 13:18:57 +01:00
jgrusewski
7ef92983f9
fix(clippy): apply cargo clippy --fix across workspace
...
Mechanical auto-fixes: redundant borrows, clone on Copy, or_insert_with,
single-char push_str, get(0) → first(), needless borrow, let_and_return.
150 files, no behavior changes.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
2026-03-10 11:17:51 +01:00
jgrusewski
b616d024ad
fix(dqn): IQN GPU PER weights, staged GPU buffer, CUDA default in all ML crates
...
Three fixes for GPU PER hot path:
1. IQN quantile loss used empty CPU weights Vec instead of GPU-resident
weights_tensor_cached — caused CUDA_ERROR_ILLEGAL_ADDRESS from
uninitialized GPU memory. Now uses cached GPU tensor matching C51
and standard DQN paths.
2. GpuPrioritized add()/add_batch() replaced with StagedGpuBuffer:
add() stages on CPU (Vec::push, zero GPU ops), sample() batch-flushes
staging→GPU in one DMA before sampling. Production path (insert_batch_tensors)
bypasses staging entirely — GPU→GPU with zero CPU.
3. All 9 ML sub-crates default to cuda feature so `cargo test -p ml-dqn`
exercises GPU code paths on CUDA workstations. CI service crates use
default-features=false, unaffected.
Test results: 350 passed (was 343+7 failed), 0 failed, 1 ignored.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
2026-03-08 22:31:49 +01:00
jgrusewski
7e5af20373
fix(ci): make CUDA non-default in 5 remaining ml sub-crates
...
ml-supervised, ml-ensemble, ml-labeling, ml-explainability, ml-hyperopt
all had default = ["cuda"] which pulled cudarc into the CPU services
build, causing compile-services to fail with "nvcc not found".
Changed all to default = [] and wired ml/Cargo.toml cuda feature to
propagate to all 8 sub-crates (was only 3: ml-core, ml-dqn, ml-ppo).
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
2026-03-08 19:35:55 +01:00
jgrusewski
58f4f26113
refactor(ml): extract regime-detection, explainability, paper-trading
...
- ml-regime-detection (1.2K lines): feature_classifier, hmm modules.
Depends on ml-core + ml-dqn (RegimeType). 23 tests passing.
- ml-explainability (329 lines): integrated_gradients module.
Depends on ml-core + candle-core. 4 tests passing.
- ml-paper-trading (389 lines): broker, pnl_tracker modules.
Depends on ml-ensemble (TradeAction, TradeSignal). 8 tests passing.
Total: 21 sub-crates extracted from ml monolith.
ml reduced from ~260K to ~90K lines (65% extracted).
All tests: 841 ml + 35 in new sub-crates = 876 passing.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
2026-03-08 15:17:22 +01:00