v0.4.2
What's New
Checkpoint Architecture Persistence
-
AudioClassifierandBackbonenow store aconfigdict capturing all constructor arguments (backbone name, pooling, num_classes, etc.) -
Checkpoints (
.ptfiles) now contain bothstate_dictandconfig— fully self-describing, no need to remember how the model was built. -
New
from_checkpoint(path)classmethod reconstructs model architecture + weights in one call:model = AudioClassifier.from_checkpoint("checkpoint.pt")
Public API
-
Added
AVAILABLE_BACKBONESandAVAILABLE_POOLINGruntime tuple constants for programmatic inspection of supported options. -
Added
PoolingNametype alias (Literal["gap", "simpool", "ep"]) alongside the existingBackboneName. -
Removed internal names (
BACKBONES,POOLING,AudioClassifierConstructor,BackboneConstructor) from the public namespace — users interact only viaAudioClassifierandBackbone.
Documentation
-
Fixed
AudioClassifierandBackbonerendering as "alias of..." in ReadTheDocs API reference. -
Added
uv-based environment setup instructions in the Installation page. -
Updated Contributing page with development setup (
uv sync) and test execution (uv run pytest -v) instructions. -
Updated README training and evaluation examples to use
from_checkpoint; added PyPI publish badge.
Tests
-
Updated
test_evaluation_loopandtest_inferenceto useAudioClassifier.from_checkpoint(...)instead of manually callingtorch.load+load_state_dict.