fix: switch tracing to stderr (unbuffered) — stdbuf has no effect on Rust
Rust's std::io::Stdout uses internal BufWriter that bypasses libc, making stdbuf -oL useless. stderr is unbuffered by default in Rust, so tracing output appears immediately in container logs. Also reverts n_episodes debug cap back to 16384. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -190,7 +190,7 @@ pub fn init_json_logger(config: JsonLoggerConfig) -> CommonResult<()> {
|
||||
.with_target(true)
|
||||
.with_current_span(true)
|
||||
.with_span_list(false)
|
||||
.with_writer(std::io::stdout))
|
||||
.with_writer(std::io::stderr))
|
||||
} else {
|
||||
None
|
||||
};
|
||||
|
||||
@@ -903,7 +903,7 @@ impl DQNTrainer {
|
||||
state_dim,
|
||||
self.hyperparams.gpu_timesteps_per_episode,
|
||||
);
|
||||
optimal.max(32).min(256)
|
||||
optimal.max(32).min(16384)
|
||||
}
|
||||
Err(_) => 256, // safe fallback
|
||||
}
|
||||
@@ -971,7 +971,7 @@ impl DQNTrainer {
|
||||
aligned_sd,
|
||||
self.hyperparams.gpu_timesteps_per_episode,
|
||||
);
|
||||
let chosen = optimal.max(32).min(256) as i32; // TEMP: cap at 256 to debug H100 hang
|
||||
let chosen = optimal.max(32).min(16384) as i32;
|
||||
info!(
|
||||
"GPU auto-scaled n_episodes: {} (SMs={}, VRAM={:.0}MB)",
|
||||
chosen, hw.sm_count, hw.free_memory_mb
|
||||
|
||||
Reference in New Issue
Block a user