From 833cc07d0e366c9fed49ca9b3c3d8215c0396e33 Mon Sep 17 00:00:00 2001 From: jgrusewski Date: Thu, 2 Apr 2026 23:42:12 +0200 Subject: [PATCH] fix: training profile must not override GPU profile batch_size MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit dqn-production.toml batch_size=8192 was overriding GPU profile batch_size=64 on RTX 3050 via apply_to(), causing OOM/hang. GPU profile is the sole authority for batch_size — training profile controls learning params only. Co-Authored-By: Claude Opus 4.6 (1M context) --- config/gpu/rtx3050.toml | 2 +- crates/ml/src/training_profile.rs | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/config/gpu/rtx3050.toml b/config/gpu/rtx3050.toml index 5c2fa43f3..1c810abef 100644 --- a/config/gpu/rtx3050.toml +++ b/config/gpu/rtx3050.toml @@ -1,6 +1,6 @@ # RTX 3050 Ti (4GB VRAM) -- minimal footprint [training] -batch_size = 128 +batch_size = 64 num_atoms = 11 buffer_size = 0 # 0 = auto from VRAM hidden_dim_base = 256 diff --git a/crates/ml/src/training_profile.rs b/crates/ml/src/training_profile.rs index 4cfdc9174..82d455986 100644 --- a/crates/ml/src/training_profile.rs +++ b/crates/ml/src/training_profile.rs @@ -670,9 +670,8 @@ impl DqnTrainingProfile { if let Some(v) = t.epochs { hp.epochs = v; } - if let Some(v) = t.batch_size { - hp.batch_size = v; - } + // batch_size: NOT applied from training profile. + // GPU profile (config/gpu/*.toml) is the sole authority for batch_size. if let Some(v) = t.learning_rate { hp.learning_rate = v; }