Skip to content

Releases: Bjarten/early-stopping-pytorch

v1.0.10

11 Nov 10:34
Compare
Choose a tag to compare

v1.0.10 (2024-11-11)

Bug Fixes

  • fix: update citation author to full name (#43) (4b0e88d)

v1.0.9

11 Nov 10:24
Compare
Choose a tag to compare

v1.0.9 (2024-11-11)

Bug Fixes

  • fix: simplify build configuration and update citation format (#42) (0839e21)

v1.0.8

11 Nov 10:11
Compare
Choose a tag to compare

v1.0.8 (2024-11-11)

Bug Fixes

Chores

  • chore: update project metadata and README for citation and versioning (#40) (6834653)

v1.0.7

11 Nov 09:26
Compare
Choose a tag to compare

v1.0.7 (2024-11-11)

Bug Fixes

  • fix: correct versioning for version in init.py (#39) (bdb4545)

Unknown

  • Revert "1.0.6"

This reverts commit 9244ca3. (c96c7df)

v1.0.5

11 Nov 08:01
Compare
Choose a tag to compare

v1.0.5 (2024-11-11)

Bug Fixes

  • fix: Update semantic-release configuration for consistency and correct versioning (#38) (0faabd0)

v1.0.4

11 Nov 07:43
Compare
Choose a tag to compare

v1.0.4 (2024-11-11)

Bug Fixes

  • fix: correct version regex in semantic release config for version updates (#37) (a3a82b2)

v1.0.3

11 Nov 07:18
Compare
Choose a tag to compare

v1.0.3 (2024-11-11)

Bug Fixes

  • fix: semantic release version updating pattern (#36) (ccda0f5)

v1.0.2

11 Nov 06:48
Compare
Choose a tag to compare

v1.0.2 (2024-11-11)

Bug Fixes

  • fix: manual release and publish workflows with version updates (#35)

What's Changed

  • fix: manual release and publish workflows with version updates by @Bjarten in #35

Full Changelog: v1.0.1...v1.0.2

v1.0.1

10 Nov 11:07
Compare
Choose a tag to compare

v1.0.1 (2024-11-10)

Bug Fixes

  • fix: improve release process and documentation (#34)

Description

This PR improves the release process and documentation by:

  1. Makes tag pushing explicit in the release workflow
  2. Fixes version management in semantic release
  3. Updates README with PyPI installation instructions

Changes

  • Added explicit tag pushing parameters to semantic-release workflow
  • Updated version management in pyproject.toml:
    • Added version_toml configuration
    • Changed from dynamic to static versioning
    • Set version to match current release (1.0.1)
  • Updated README.md:
    • Added PyPI installation instructions
    • Fixed image URL for PyPI compatibility
    • Reorganized installation and usage sections (f42d5d1)
  • fix: use PyPI trusted publisher authentication (#33)

Updates the GitHub Actions publish workflow to use PyPI's Trusted
Publisher authentication instead of token-based authentication. This
change improves security by:

  • Removing the need to store PyPI tokens in GitHub secrets
  • Using OpenID Connect (OIDC) for secure authentication
  • Leveraging PyPI's recommended authentication method for GitHub Actions

Changes

  • Removed token-based authentication (TWINE_USERNAME and TWINE_PASSWORD)
  • Added required id-token: write permission for OIDC
  • Switched from manual twine upload to pypa/gh-action-pypi-publish
    action (3a0d9b8)

v1.0.0

18 Oct 08:20
Compare
Choose a tag to compare

v1.0.0 (2024-10-18)

Breaking

  • chore!: rename package, restructure files, and add pip integration (#29)

This update introduces significant changes to the project, including
renaming the package, restructuring the directory, and setting up
automated publishing to PyPI using API tokens.

Key Changes:

  1. Package Renaming:
  • The package has been renamed from pytorchtools to
    early_stopping_pytorch for clearer naming and better alignment with
    its functionality.
  1. Directory Restructuring:
  • Project files have been reorganized for clarity, with the source code
    placed under the early_stopping_pytorch/ directory in the root of the
    project.
  1. PyPI Integration:
  • Added support for automated publishing to PyPI using GitHub Actions.
  • API tokens are used for secure publishing, stored as GitHub
    Secrets (PYPI_TOKEN).

Impact:

  • Breaking Changes: Users will need to update their import paths
    from:

    from pytorchtools import EarlyStopping

    to:

    from early_stopping_pytorch import EarlyStopping
  • New versions will be automatically published to PyPI when a new tag is
    pushed, using the API token for authentication. (f9522dd)

Bug Fixes

  • fix: release workflow 2 (#32)

This PR modifies our Semantic Release workflow to ensure it's only
triggered manually:

  1. Removed automatic trigger on push to main branch
  2. Retained only the workflow_dispatch trigger
  3. Simplified job structure while maintaining all necessary steps and
    permissions

These changes provide more control over when releases are created,
allowing us to:

  • Prevent unintended automatic releases
  • Manually initiate the release process when desired
  • Maintain full functionality of the Semantic Release process (ddc6493)
  • fix: release workflow (#31)

This PR updates our Semantic Release workflow to align with best
practices and official documentation. Key changes include:

  1. Simplified the workflow to use the official Python Semantic Release
    GitHub Action.
  2. Adjusted permissions to ensure proper access for creating releases
    and tags.
  3. Updated pyproject.toml to prevent double publishing to PyPI.

These changes aim to:

  • Streamline our release process
  • Improve reliability and consistency of our versioning (b291782)
  • fix: add check for NaN validation loss in EarlyStopping (#28)

This PR addresses an issue where EarlyStopping incorrectly treats
nan validation losses as an improvement, often caused by exploding
gradients.

Key changes:

  • Added np.isnan(val_loss) check to ensure that nan validation
    losses are ignored.
  • Updated the logic to ensure that the patience counter and model
    checkpointing are unaffected by nan values.
  • Introduced a new unit test, test_validation_loss_nan, to verify that
    EarlyStopping behaves correctly when nan values are encountered
    during training.

Closes #16 (676686b)

Chores

  • chore: consolidate version definitions and update release workflow (#30)

This pull request consolidates version definitions and improves the
release workflow to streamline the versioning and publishing processes.
The changes are part of an effort to improve maintainability and ensure
the workflows are efficient and modular.

Changes Made:

  • Consolidated Version Management:

  • Removed duplicate version definitions to maintain a single source of
    truth. The version is now only defined in
    early_stopping_pytorch/__init__.py to avoid conflicts.

  • Removed the version field from pyproject.toml, as
    python-semantic-release handles versioning automatically.

  • Updated Release Workflow:

  • Improved the Create New Release workflow by separating the release
    process from the publishing process.

  • The release process now handles version bumping, tagging, and creating
    GitHub releases via python-semantic-release.

  • New Publish Workflow:

  • A dedicated workflow now handles publishing the package to PyPI when a
    new version tag is pushed.

  • This ensures a clear separation of responsibilities between creating
    releases and publishing to PyPI, reducing complexity. (e79817a)

Features

  • feat(ci): add GitHub Action for Python tests, fix EarlyStopping logic, and add unit tests (#27)

This PR introduces several key changes:

  1. A GitHub Actions workflow for continuous integration, running tests
    across multiple Python versions.
  2. Fixes to the EarlyStopping class logic, changing best_score to
    best_val_loss to improve clarity and correctness.
  3. A new test suite for the EarlyStopping class to ensure its correct
    behavior after the logic fix.

Changes:

  • Added Python application tests:

  • A new workflow named "Python Application Tests" runs on GitHub
    Actions.

  • Tests are executed across multiple Python versions (3.9, 3.10,
    3.11, 3.12).

  • The workflow is triggered on pushes and pull requests to the main
    branch.

    • Pip dependencies are cached to optimize performance.
  • Fixed EarlyStopping logic:

  • The variable best_score was renamed to best_val_loss for clarity,
    improving the code's readability and matching the purpose of the
    variable.

  • Logic for early stopping was updated to properly handle edge cases for
    delta and stopping conditions based on validation loss behavior.

  • Added Unit Tests for EarlyStopping:

  • The file test_early_stopping.py contains a thorough set of tests
    covering:

    • Initialization and attribute checks.
    • Behavior when validation loss improves.
    • Handling when validation loss does not improve.
    • Proper functionality of patience and delta parameters.
    • Edge cases for early stopping triggers and verbose output.

Why this change is important:

  • Automates testing across different Python versions to ensure
    compatibility and reliability.
  • Fixes logic issues in the EarlyStopping class, making it more robust
    and clear.
  • Ensures the EarlyStopping class functions as expected through the
    added unit tests.
  • Improves development velocity by automatically running tests on every
    push and pull request. (ffe12ee)