feat: add run_pretrain.py; fix output-path naming and max_seq_len

- scripts/run_pretrain.py: single-command pre-training runner with
  timing estimate, loss-curve plot (matplotlib), and per-epoch report.
  Sets max_seq_len=256 (McGill sequences max out at 195 tokens, ~4x
  faster attention than the 512 default).
- src/train.py: normalise --output so pretrained.pt and pretrained both
  produce pretrained.pt + pretrained.log.csv (not pretrained.pt.log.csv).
  Serialize Path fields as strings in checkpoint to satisfy weights_only.
- requirements.txt: drop unused pandas/music21, add mido (pretty_midi dep).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-05-20 12:13:38 +03:00
parent 733e1fde1f
commit dd4f21f17f
3 changed files with 220 additions and 4 deletions
+1 -2
View File
@@ -4,11 +4,10 @@
# Core ML
torch==2.12.0
numpy==2.4.6
pandas==3.0.3
# Music processing
music21==10.1.0
pretty_midi==0.2.11
mido==1.3.3
# Visualization
matplotlib==3.10.9