feat(hyperopt): make TPE the default optimizer
Change --optimizer default from "pso" to "tpe" since TPE has better sample efficiency in 25D spaces. Fix clippy let_underscore_must_use on CUDA sync tensor readback. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -104,8 +104,8 @@ struct Args {
|
||||
#[arg(long, default_value = "1.0")]
|
||||
spread_ticks: f64,
|
||||
|
||||
/// Optimizer to use: "pso" (Particle Swarm) or "tpe" (Tree-Parzen Estimator)
|
||||
#[arg(long, default_value = "pso")]
|
||||
/// Optimizer to use: "tpe" (Tree-Parzen Estimator) or "pso" (Particle Swarm)
|
||||
#[arg(long, default_value = "tpe")]
|
||||
optimizer: String,
|
||||
|
||||
/// Number of parallel trial evaluations (PSO only; TPE is always sequential).
|
||||
|
||||
@@ -2950,7 +2950,7 @@ impl HyperparameterOptimizable for DQNTrainer {
|
||||
if let Ok(sync_tensor) =
|
||||
candle_core::Tensor::zeros(1, candle_core::DType::F32, &cleanup_device)
|
||||
{
|
||||
let _ = sync_tensor.to_vec0::<f32>();
|
||||
drop(sync_tensor.to_vec0::<f32>());
|
||||
}
|
||||
// Brief pause to allow CUDA memory allocator to reclaim freed blocks
|
||||
std::thread::sleep(std::time::Duration::from_millis(50));
|
||||
|
||||
Reference in New Issue
Block a user