fix: DQN pipeline tests use smoketest profile for consistent GPU sizing

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
jgrusewski
2026-04-04 01:21:11 +02:00
parent 6ed0513017
commit 8345f750da

View File

@@ -176,16 +176,17 @@ async fn test_dqn_trains_on_es_fut() -> Result<()> {
let checkpoint_dir = create_checkpoint_dir()?;
// Configure hyperparameters for fast test (5 epochs)
// Configure hyperparameters: smoketest profile for consistent sizing across GPUs
let mut hyperparams = DQNHyperparameters::conservative();
ml::training_profile::DqnTrainingProfile::load("dqn-smoketest").apply_to(&mut hyperparams);
// GPU PER is mandatory for fused CUDA training — do not disable
hyperparams.epochs = 3; // CI smoke: validate pipeline, not convergence
hyperparams.batch_size = 64;
hyperparams.learning_rate = 0.001;
hyperparams.epsilon_start = 0.5;
hyperparams.epsilon_end = 0.05;
hyperparams.checkpoint_frequency = 3;
hyperparams.early_stopping_enabled = false; // Test all epochs
hyperparams.replay_buffer_vram_fraction = 0.0; // Explicit buffer_size from TOML
info!(data_dir = %data_dir, checkpoint_dir = %checkpoint_dir.display(), epochs = hyperparams.epochs, "Configuration ready");
@@ -304,6 +305,8 @@ async fn test_dqn_loss_decreases() -> Result<()> {
// Train for 3 epochs — CI validates gradient flow, not full convergence
let mut hyperparams = DQNHyperparameters::conservative();
ml::training_profile::DqnTrainingProfile::load("dqn-smoketest").apply_to(&mut hyperparams);
hyperparams.replay_buffer_vram_fraction = 0.0;
// GPU PER is mandatory for fused CUDA training — do not disable
hyperparams.epochs = 3;
hyperparams.batch_size = 64;
@@ -378,6 +381,8 @@ async fn test_dqn_checkpoint_save_load() -> Result<()> {
// Train for 2 epochs and save checkpoint
let mut hyperparams = DQNHyperparameters::conservative();
ml::training_profile::DqnTrainingProfile::load("dqn-smoketest").apply_to(&mut hyperparams);
hyperparams.replay_buffer_vram_fraction = 0.0;
// GPU PER is mandatory for fused CUDA training — do not disable
hyperparams.epochs = 2;
hyperparams.batch_size = 64;
@@ -447,6 +452,8 @@ async fn test_dqn_q_value_predictions() -> Result<()> {
// Train minimal model
let mut hyperparams = DQNHyperparameters::conservative();
ml::training_profile::DqnTrainingProfile::load("dqn-smoketest").apply_to(&mut hyperparams);
hyperparams.replay_buffer_vram_fraction = 0.0;
// GPU PER is mandatory for fused CUDA training — do not disable
hyperparams.epochs = 2;
hyperparams.batch_size = 32;
@@ -504,6 +511,8 @@ async fn test_dqn_epsilon_greedy() -> Result<()> {
// Configure with high epsilon decay
let mut hyperparams = DQNHyperparameters::conservative();
ml::training_profile::DqnTrainingProfile::load("dqn-smoketest").apply_to(&mut hyperparams);
hyperparams.replay_buffer_vram_fraction = 0.0;
hyperparams.epochs = 2;
hyperparams.epsilon_start = 1.0;
hyperparams.epsilon_end = 0.01;
@@ -578,8 +587,10 @@ async fn test_dqn_full_production_training() -> Result<()> {
let checkpoint_dir = create_checkpoint_dir()?;
let production_checkpoint_path = checkpoint_dir.join("dqn_es_fut_v1.safetensors");
// Production hyperparameters
// Production hyperparameters (smoketest profile for GPU sizing)
let mut hyperparams = DQNHyperparameters::conservative();
ml::training_profile::DqnTrainingProfile::load("dqn-smoketest").apply_to(&mut hyperparams);
hyperparams.replay_buffer_vram_fraction = 0.0;
// GPU PER is mandatory for fused CUDA training — do not disable
hyperparams.epochs = 50;
hyperparams.batch_size = 128;