Commit Graph

6 Commits

Author SHA1 Message Date
hexone2086 56aa10a503 feat: per-step supervision over full sequence
- model outputs (B, S, 2) instead of (B, 2) — GRU output at every timestep
- train/val loss computed over all S timesteps with reduction=none
- benchmark/evaluate.py takes pred[:, -1, :] for final-step evaluation
- added per-step loss logging (8 evenly spaced steps) to TensorBoard

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-07-09 15:49:23 +08:00
hexone2086 b0942180ba feat: add --threshold CLI arg for event brightness override; move ckpt_dir under run_id subdirectory
- --threshold CLI arg overrides config event_threshold at runtime
- Move ckpt_dir creation after run_id resolution (run-specific subdirectory)
- Use overridden threshold in train/val loader creation

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-06-21 20:32:01 +08:00
hexone2086 1369edaad7 feat: enable BatchNorm2d in CNNEncoder and add AMP support
- Uncomment BatchNorm2d in CNNEncoder (activated when cfg.use_bn=True)
- Add torch.amp.GradScaler + autocast for mixed precision training
- Add --amp/--no-amp CLI argument (default: enabled)

Generated by Mistral Vibe. deepseek-v4-flash
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-06-08 00:41:34 +08:00
hexone2086 cb9936542e feat: replace non-overlapping windows with sliding-window sequence sampling
- Remove sample-level shuffle before transforms (broke SimulateEvents)
- Add _sliding_window_fn: yields overlapping sequences with configurable stride
- Add sequence-level shuffle after grouping (preserves temporal coherence)
- Add sliding_window_stride to TrainConfig (stride=1 for full overlap)
- Update create_train/val_loader and train.py to pass stride
- AGENTS.md: document known issues (cross-shard boundary, SimulateEvents state)
- AGENTS.md: add cuda:7 device preference

Generated by Mistral Vibe (deepseek-v4-flash).
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-06-05 16:45:24 +08:00
hexone2086 ec143868d0 feat: add checkpoint resume and fix train_loss tracking
- Add --resume CLI arg to resume training from a checkpoint
- Restore model, optimizer, scheduler state; continue from saved epoch+1
- Preserve global_step and best_val_loss across resume
- Save run_id in checkpoints for TensorBoard log continuity
- Use logs/run_<timestamp>/ subdirectories to isolate experiment logs
- Fix: replace train_loss in checkpoint dict with global_step to avoid
  KeyError when loading; track global_step through train_one_epoch
- Fix: use global_step (not batch_idx) as TensorBoard x-axis for batch loss
- Fix: print average loss at end of each epoch

Generated by Mistral Vibe (ds-v4-flash).
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-06-04 22:55:31 +08:00
hexone2086 9f0321eff8 initial commit 2026-05-29 18:49:01 +08:00