Skip to content

Dependency Update, Training Improvements, and a PyPI Package#93

Open
JinruG wants to merge 14 commits intoGhadjeres:masterfrom
JinruG:master
Open

Dependency Update, Training Improvements, and a PyPI Package#93
JinruG wants to merge 14 commits intoGhadjeres:masterfrom
JinruG:master

Conversation

@JinruG
Copy link
Copy Markdown

@JinruG JinruG commented Mar 23, 2026

Dependency Compatibility

The original codebase pinned dependencies to versions from 2018–2019 that are now incompatible with modern environments. This PR brings them up to date while preserving full backward compatibility with the existing model architecture and training logic:

Python ≥ 3.9
PyTorch ≥ 2.0.0
music21 ≥ 8.1.0
numpy ≥ 1.23.0

Training Improvements

  • cuda() called before train() : The model previously was moved to GPU only after training, causing the entire training loop to run on CPU.
  • Best-val-loss checkpointing : Each voice model now saves only the checkpoint that achieved the lowest validation loss, rather than always overwriting with the final epoch.
  • ReduceLROnPlateau scheduler : Learning rate is automatically reduced when validation loss plateaus, controlled by the new --lr_patience and --lr_factor options above.

Dependency Compatibility

deepbach_pytorch PyPI Package

https://pypi.org/project/deepbach-pytorch/0.3.6/

A test script (test.py) is included that exercises the public API entry point:

test.py

@JinruG JinruG changed the title Training Improvements, LR Scheduler, GPU Fixes, and PyPI Package Dependency Update, Training Improvements, and a PyPI Package Mar 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant