Refactor/migrate to pytorch and simplify architecture - #39
Merged
filippogiruzzi merged 12 commits intoMay 29, 2026
Merged
Conversation
filippogiruzzi
deleted the
refactor/migrate-to-pytorch-and-simplify-architecture
branch
May 29, 2026 13:27
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR description
** 💥 Breaking change 💥 **
Migrate the Voice Activity Detection project from TensorFlow to a modern PyTorch stack and simplify the codebase. The legacy
data_processing/training/inferencepackages are replaced by a flatvad/package with four focused modules:data.py,model.py,train.py,inference.py.Key features:
Resnet1Dacoustic model driven by a typed, frozenModelConfigdataclass.pyproject.toml(replacessetup.py/requirements.txt), withvad-data,vad-train,vad-inferenceconsole scripts.logurulogging across all CLI entrypoints, automatic device selection (CUDA / Apple MPS / CPU), and TensorBoard logging.rufflint/format,pytestwith coverage inmake test, updated Docker images, and refreshed GitHub Actions (CI lint+test, CD Docker build & push).New behaviour
uv run vad-train(checkpoints + TorchScript export, configurable--epochs,--batch-size,--lr,--n-filters,--fc-units).uv run vad-inference(optional smoothing, visualization), using aModelConfigthat must match the trained architecture.uv run vad-data.Validation tests
uv run ruff check .— lint cleanuv run ruff format --check .— formatting cleanuv run pytest(with coverage) — integration tests passuv sync— package metadata/build valid (GPL-3.0 license)uv run vad-databuilds dataset on real LibriSpeech datauv run vad-traintrains, exports, and logs to TensorBoarduv run vad-inferenceloads checkpoint and runs predictions