Skip to content

v0.4.2

Choose a tag to compare

@ChrisNick92 ChrisNick92 released this 02 Apr 13:29
· 19 commits to main since this release
5f8f41b

What's New

Checkpoint Architecture Persistence

  • AudioClassifier and Backbone now store a config dict capturing all constructor arguments (backbone name, pooling, num_classes, etc.)
  • Checkpoints (.pt files) now contain both state_dict and config — 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_BACKBONES and AVAILABLE_POOLING runtime tuple constants for programmatic inspection of supported options.
  • Added PoolingName type alias (Literal["gap", "simpool", "ep"]) alongside the existing BackboneName.
  • Removed internal names (BACKBONES, POOLING, AudioClassifierConstructor, BackboneConstructor) from the public namespace — users interact only via AudioClassifier and Backbone.

Documentation

  • Fixed AudioClassifier and Backbone rendering 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_loop and test_inference to use AudioClassifier.from_checkpoint(...) instead of manually calling torch.load + load_state_dict.