fix(test): update dqn_training_pipeline_test callback to 3-arg signature
The train() callback was changed to (epoch, data, is_best) but this test still used (epoch, data). Update all 5 call sites. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -105,7 +105,7 @@ async fn test_dqn_trains_on_es_fut() -> Result<()> {
|
||||
let mut final_checkpoint_path = PathBuf::new();
|
||||
|
||||
let metrics = trainer
|
||||
.train(&data_dir, |epoch, checkpoint_data| {
|
||||
.train(&data_dir, |epoch, checkpoint_data, _is_best| {
|
||||
let path = checkpoint_dir.join(format!("dqn_test_epoch_{}.safetensors", epoch));
|
||||
std::fs::write(&path, checkpoint_data)?;
|
||||
checkpoint_saved = true;
|
||||
@@ -224,7 +224,7 @@ async fn test_dqn_loss_decreases() -> Result<()> {
|
||||
|
||||
// Track losses per epoch (would need to modify trainer to expose this)
|
||||
let metrics = trainer
|
||||
.train(&data_dir, |epoch, checkpoint_data| {
|
||||
.train(&data_dir, |epoch, checkpoint_data, _is_best| {
|
||||
let path = checkpoint_dir.join(format!("dqn_loss_test_epoch_{}.safetensors", epoch));
|
||||
std::fs::write(&path, checkpoint_data)?;
|
||||
Ok(path.to_string_lossy().to_string())
|
||||
@@ -282,7 +282,7 @@ async fn test_dqn_checkpoint_save_load() -> Result<()> {
|
||||
let mut saved_checkpoint_path = PathBuf::new();
|
||||
|
||||
let _metrics = trainer
|
||||
.train(&data_dir, |epoch, checkpoint_data| {
|
||||
.train(&data_dir, |epoch, checkpoint_data, _is_best| {
|
||||
let path =
|
||||
checkpoint_dir.join(format!("dqn_checkpoint_test_epoch_{}.safetensors", epoch));
|
||||
std::fs::write(&path, checkpoint_data)?;
|
||||
@@ -345,7 +345,7 @@ async fn test_dqn_q_value_predictions() -> Result<()> {
|
||||
let mut trainer = DQNTrainer::new(hyperparams)?;
|
||||
|
||||
let metrics = trainer
|
||||
.train(&data_dir, |epoch, checkpoint_data| {
|
||||
.train(&data_dir, |epoch, checkpoint_data, _is_best| {
|
||||
let path = checkpoint_dir.join(format!("dqn_qvalue_test_epoch_{}.safetensors", epoch));
|
||||
std::fs::write(&path, checkpoint_data)?;
|
||||
Ok(path.to_string_lossy().to_string())
|
||||
@@ -401,7 +401,7 @@ async fn test_dqn_epsilon_greedy() -> Result<()> {
|
||||
let mut trainer = DQNTrainer::new(hyperparams)?;
|
||||
|
||||
let metrics = trainer
|
||||
.train(&data_dir, |epoch, checkpoint_data| {
|
||||
.train(&data_dir, |epoch, checkpoint_data, _is_best| {
|
||||
let path = checkpoint_dir.join(format!("dqn_epsilon_test_epoch_{}.safetensors", epoch));
|
||||
std::fs::write(&path, checkpoint_data)?;
|
||||
Ok(path.to_string_lossy().to_string())
|
||||
@@ -470,7 +470,7 @@ async fn test_dqn_full_production_training() -> Result<()> {
|
||||
let mut epoch_count = 0;
|
||||
|
||||
let metrics = trainer
|
||||
.train(&data_dir, |epoch, checkpoint_data| {
|
||||
.train(&data_dir, |epoch, checkpoint_data, _is_best| {
|
||||
epoch_count += 1;
|
||||
let path = if epoch == hyperparams.epochs {
|
||||
production_checkpoint_path.clone()
|
||||
|
||||
Reference in New Issue
Block a user