What's Changed
This pull request introduces significant improvements to the release automation workflow and adds enhanced support for Apple's Metal (MPS) backend in PyTorch models. It also bumps the project version to 0.10.0. Below are the most important changes grouped by theme:
Release Automation Overhaul:
- Replaces the old release workflows (
release.ymlandrelease-check.yml) with a new, modular set of GitHub Actions:.github/workflows/release-on-branch-create.yml: Automatically validates and prepares release branches, updates version numbers, and creates draft pull requests for new releases..github/workflows/release-on-merge.yml: Handles release tagging, PyPI/TestPyPI publishing, next release branch creation, and hotfix propagation after merging release PRs intomaster.
- Removes legacy release workflows to avoid conflicts and streamline the process.
PyTorch MPS (Apple Silicon) Support:
- Updates device parsing and selection logic in
batchflow/models/torch/base.pyto recognize and use the MPS backend when available, in addition to CUDA and CPU. - Ensures device lists and device-specific operations (autocast, GradScaler, etc.) are compatible with MPS, not just CUDA.
- Adjusts AMP (automatic mixed precision) and backend benchmarking logic to be device-agnostic.
Version Bump:
- Increments the project version in
pyproject.tomlfrom 0.9.4 to 0.10.0 to reflect these breaking and feature changes.
Full Changelog: v0.9.4...v0.10.0