From 200868840ad20f4b28797c30e2accc8320efcb1c Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 17 Feb 2025 15:08:53 +0100 Subject: [PATCH] Heat 1.5.1 - Release (#1796) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Bump version to 1.5.1 * add backport label * updated changelog * Update CHANGELOG.md * updated pre-commit * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Update CITATION.cff * Support pytorch 2.6 * Match torchvision to pytorch 2.6 * updated release note * Updated RELEASE.md * Merge pull request #1775 from helmholtz-analytics/support/new-pytorch-main Support PyTorch 2.6.0 / Add zarr as optional dependency * Removing some cherrypicked stuff * Update RELEASE.md * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: Heat Release Bot <> Co-authored-by: Claudia Comito <39374113+ClaudiaComito@users.noreply.github.com> Co-authored-by: Gutiérrez Hermosillo Muriedas, Juan Pedro Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Fabian Hoppe <112093564+mrfh92@users.noreply.github.com> --- .github/workflows/ci.yaml | 1 + .github/workflows/latest-pytorch-support.yml | 2 +- .pre-commit-config.yaml | 6 +- CHANGELOG.md | 24 +++++ CITATION.cff | 2 + RELEASE.md | 97 +++++++------------- heat/core/sanitation.py | 2 +- heat/core/types.py | 2 +- heat/core/version.py | 2 +- scripts/heat_test.py | 2 +- setup.py | 4 +- 11 files changed, 68 insertions(+), 76 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index de1371815a..fe6ceb8d25 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -25,6 +25,7 @@ jobs: - 'torch==2.3.1 torchvision==0.18.1 torchaudio==2.3.1' - 'torch==2.4.1 torchvision==0.19.1 torchaudio==2.4.1' - 'torch==2.5.1 torchvision==0.20.1 torchaudio==2.5.1' + - 'torch==2.6.0 torchvision==0.21.0 torchaudio==2.6.0' exclude: - py-version: '3.12' pytorch-version: 'torch==2.0.1 torchvision==0.15.2 torchaudio==2.0.2' diff --git a/.github/workflows/latest-pytorch-support.yml b/.github/workflows/latest-pytorch-support.yml index 0e6acd5952..0b2060d302 100644 --- a/.github/workflows/latest-pytorch-support.yml +++ b/.github/workflows/latest-pytorch-support.yml @@ -67,5 +67,5 @@ jobs: Auto-generated by [create-pull-request][1] [1]: https://github.com/peter-evans/create-pull-request reviewers: ClaudiaComito, mtar, mrfh92 - labels: interoperability + labels: backport stable, interoperability draft: true diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 332918512c..e49c5a5f8a 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -2,7 +2,7 @@ # See https://pre-commit.com/hooks.html for more hooks repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.6.0 + rev: v5.0.0 hooks: - id: trailing-whitespace - id: end-of-file-fixer @@ -10,11 +10,11 @@ repos: - id: check-added-large-files - id: check-toml - repo: https://github.com/psf/black-pre-commit-mirror - rev: 24.8.0 + rev: 25.1.0 hooks: - id: black - repo: https://github.com/PyCQA/flake8 - rev: 7.1.1 + rev: 7.1.2 hooks: - id: flake8 - repo: https://github.com/pycqa/pydocstyle diff --git a/CHANGELOG.md b/CHANGELOG.md index 1f7a0bb37f..4187c196b3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,27 @@ +# v1.5.1 +## Changes + +### Compatibility +- #1706 Support PyTorch 2.5.1 (#1701) (by @mtar) +- #1775 Support PyTorch 2.6.0 (#1775) (by @mrfh92) + +### Bug Fixes +- #1791 `heat.eq`, `heat.ne` now allow non-array operands (by @[github-actions[bot]](https://github.com/apps/github-actions)) +- #1790 Fixed precision loss in several functions when dtype is float64 (by @[github-actions[bot]](https://github.com/apps/github-actions)) +- #1764 Printing non-distributed data (by @[github-actions[bot]](https://github.com/apps/github-actions)) + +### CI +- #1750 Linters will no longer format tutorials (by @[github-actions[bot]](https://github.com/apps/github-actions)) +- #1708 Documentation updates after new release (by @[github-actions[bot]](https://github.com/apps/github-actions)) +- #1743 Modernise setup.py configuration (by @[github-actions[bot]](https://github.com/apps/github-actions)) + +### Docs +- #1698 Added Dalcin et al. 2018 reference to `manipulations._axis2axisResplit` (by @[github-actions[bot]](https://github.com/apps/github-actions)) +- #1745 Easier access to GitHub from the docs (by @[github-actions[bot]](https://github.com/apps/github-actions)) + +## Contributors +@ClaudiaComito, @JuanPedroGHM, @github-actions[bot], @joernhees, @mrfh92, @mtar and [github-actions[bot]](https://github.com/apps/github-actions) v1.5.1 - Heat 1.5.1 + # v1.5.0 ## Changes diff --git a/CITATION.cff b/CITATION.cff index 1365ebe721..78d184e4a1 100644 --- a/CITATION.cff +++ b/CITATION.cff @@ -23,6 +23,8 @@ authors: given-names: Tu - family-names: Tarnawa given-names: Michael + - family-names: Hees + given-names: Jörn # core team # - family-names: Comito # given-names: Claudia diff --git a/RELEASE.md b/RELEASE.md index 2b0e6cc97e..8cd35e124f 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -18,52 +18,38 @@ In the following, we assume we are about to release Heat v1.5.0. - You need [PyPi](https://pypi.org/), [Test.PyPi](https://test.pypi.org/) account - All intended PRs are merged, all tests have passed, and the `main` branch is ready for release. -1. We will release all new features in the development branch `main`. Branch off `main` to create a new release branch, e.g.: +**Create Pre-release Branch** -```bash -git checkout main -git pull -git checkout -b release/1.5.x -``` +1. Got to [this GH Action](https://github.com/helmholtz-analytics/heat/actions/workflows/release-prep.yml) and start a new manual workflow. -2. Create a new branch off `release/1.5.x` and update the version number in `heat/core/version.py`: + a. `Use workflow from` should always be `main`. -```bash -git checkout release/1.5.x -git pull -git checkout -b workflows/version-update -``` + b. Set the version number to the next release (1.5.0) in this case. + c. Because this is a major or minor release, the base branch should be `main`. + d. Change the title, if you want to give the release a special name. -Update `heat/core/version.py` like this: + e. Run the workflow. -```python -"""This module contains Heat's version information.""" +When the workflow is done, you should see two new pull requests. One targeting `main`, the other one targeting `stable`. Both should be created for the same branch, `pre-release/x.y.z`. The new branch should include changes with the new version number on `version.py`, and an up-to-date `CHANGELOG.md`. For now, **ignore the PR targeting `main`**. That PR should only be merged after the release has been merged to `stable`. -major: int = 1 -"""Indicates Heat's main version.""" -minor: int = 4 # <-- update to 5 -"""Indicates feature extension.""" -micro: int = 2 # <-- update to 0 -"""Indicates revisions for bugfixes.""" -extension: str = "dev" # <-- set to None -"""Indicates special builds, e.g. for specific hardware.""" -``` +2. Ensure that the changes to `version.py` and `CHANGELOG.md` are correct, if not, fix them. -3. Commit and push new `version.py` in `workflows/version-update`. +3. If necessary, also update the Requirements section on README.md to reflect the latest version of the dependencies. -4. If necessary, also update the Requirements section on README.md to reflect the latest version of the dependencies. +4. Update `CITATION.cff` if needed, i.e. add names of non-core contributors (they are included in the Release notes draft you just created). -5. Update `CITATION.cff` if needed, i.e. add names of non-core contributors (they are included in the Release notes draft you just created). Push to `workflows/version-update`. - -6. Create a pull request from `workflows/version-update` to `release/1.5.x` - - - Remember to get a reviewers approval. +5. Once the changes are done: + - Get a reviewers approval. + - ONLY MERGE THE PR FOR `stable` + - DO NOT DELETE THE BRANCH AFTERWARDS. - Wait for the tests to finish. - Squash and merge. -7. Draft release notes: +Go to the main repo page, and then to releases (right panel). There should be a draft release with the changes made by the latest release. + +6. Draft release notes: - Go to the GitHub repo's [Releases](https://github.com/helmholtz-analytics/heat/releases) page. - The release notes draft is automated. Click on Edit Draft @@ -71,7 +57,8 @@ extension: str = "dev" # <-- set to None - Edit release notes as needed (see older releases) - Click on Save **but do not publish yet** -8. Build wheel in your local `heat/` directory, make sure you are on branch `release/1.5.x`. +7. On your local machine, fetch all the changes from origin, checkout the `stable` branch. +8. Build wheel in your local `heat/` directory. ```bash rm -f dist/* @@ -99,50 +86,28 @@ extension: str = "dev" # <-- set to None - Make sure the CHANGELOG.md got updated, if not, call @JuanPedroGHM. - Check our [Zenodo page](https://zenodo.org/doi/10.5281/zenodo.2531472) to make sure a DOI was created for the release. -12. On branch `main`, we want to modify the version so that `minor` is increased by 1, and `extension` is "dev". In this example we want the version on `main` to be:`1.6.0-dev`. We need to create a new branch from `main`: - - ```bash - git checkout main - git pull - git checkout -b workflows/update-version-main - git branch - ``` - - On branch `workflows/update-version-main`, modify `version.py` so that `minor` is increased by 1, and `extension` is `"dev"`. Commit and push the changes. +12. On branch `main`, we want to modify the version so that `minor` is increased by 1, and `extension` is "dev". We also want to merge any changes to the changelog, and overall make sure it is up to date with the latest release changes. That is what the second PR is for. In this example we want the version on `main` to be:`1.6.0-dev`. We go to the left over PR, and change the version number accordingly. Make sure to also fix any merge conflicts. -13. Create a PR with `main` as the base branch. - -14. Get approval and merge. You're done! Except if you're a conda-forge maintainer, then see [conda-forge build](#conda-forge-build). +13. Get approval and merge. You're done! Except if you're a conda-forge maintainer, then see [conda-forge build](#conda-forge-build). ### Patch release (e.g. 1.5.0 --> 1.5.1) -1. Check that all intended branches have been merged to the release branch you want to upgrade, in this example `release/1.5.x`. Create a new branch off `release/1.5.x`, e.g.: - -```bash -git checkout release/1.5.x -git pull -git checkout -b workflows/version-update -``` +1. Check that all intended branches have been merged to the `stable` branch. -2. Update `heat/core/version.py` like this: +2. Got to [this GH Action](https://github.com/helmholtz-analytics/heat/actions/workflows/release-prep.yml) and start a new manual workflow. -```python -"""This module contains Heat's version information.""" + 1. `Use workflow from` should always be `main`. + 2. Set the version number to the next release (1.5.1 in this case). + 3. Because this is a patch release, the base branch should be `stable`. + 4. Change the title, if you want to give the release a special name. + 5. Run the workflow. -major: int = 1 -"""Indicates Heat's main version.""" -minor: int = 5 -"""Indicates feature extension.""" -micro: int = 0 # <-- update to 1 -"""Indicates revisions for bugfixes.""" -extension: str = None -"""Indicates special builds, e.g. for specific hardware.""" -``` +When the workflow is done, you should see two new pull requests. One targeting `main`, the other one targeting `stable`. Both should be created for the same branch, `pre-release/x.y.z`. The new branch should include changes with the new version number on `version.py`, and an update `CHANGELOG.md`. For now, **ignore the PR targeting `main`**. That PR should only be merged after the release has been merged to `stable`. -3. Follow steps 3-14 from the [Major or minor release section](#major-or-minor-release). +3. Follow steps 2-14 from the [Major or minor release section](#major-or-minor-release). ## conda-forge build diff --git a/heat/core/sanitation.py b/heat/core/sanitation.py index 5a51344014..a820c8b92e 100644 --- a/heat/core/sanitation.py +++ b/heat/core/sanitation.py @@ -312,7 +312,7 @@ def sanitize_out( def sanitize_sequence( - seq: Union[Sequence[int, ...], Sequence[float, ...], DNDarray, torch.Tensor] + seq: Union[Sequence[int, ...], Sequence[float, ...], DNDarray, torch.Tensor], ) -> List: """ Check if sequence is valid, return list. diff --git a/heat/core/types.py b/heat/core/types.py index 43a8d7f41a..6bb8e0272c 100644 --- a/heat/core/types.py +++ b/heat/core/types.py @@ -565,7 +565,7 @@ def heat_type_is_complexfloating(ht_dtype: Type[datatype]) -> bool: def heat_type_of( - obj: Union[str, Type[datatype], Any, Iterable[str, Type[datatype], Any]] + obj: Union[str, Type[datatype], Any, Iterable[str, Type[datatype], Any]], ) -> Type[datatype]: """ Returns the corresponding HeAT data type of given object, i.e. scalar, array or iterable. Attempts to determine the diff --git a/heat/core/version.py b/heat/core/version.py index f2568eeb3f..0d7e23cc23 100644 --- a/heat/core/version.py +++ b/heat/core/version.py @@ -4,7 +4,7 @@ """Indicates Heat's main version.""" minor: int = 5 """Indicates feature extension.""" -micro: int = 0 +micro: int = 1 """Indicates revisions for bugfixes.""" extension: str = None """Indicates special builds, e.g. for specific hardware.""" diff --git a/scripts/heat_test.py b/scripts/heat_test.py index 98a5e49a37..271d59013d 100644 --- a/scripts/heat_test.py +++ b/scripts/heat_test.py @@ -1,4 +1,4 @@ -""" Test script for MPI & Heat installation """ +"""Test script for MPI & Heat installation""" import heat as ht diff --git a/setup.py b/setup.py index bb71bf1c30..2fd4d61363 100644 --- a/setup.py +++ b/setup.py @@ -35,10 +35,10 @@ install_requires=[ "mpi4py>=3.0.0", "numpy>=1.22.0, <2", - "torch>=2.0.0, <2.5.2", + "torch>=2.0.0, <2.6.1", "scipy>=1.10.0", "pillow>=6.0.0", - "torchvision>=0.15.2, <0.20.2", + "torchvision>=0.15.2, <0.21.1", ], extras_require={ "docutils": ["docutils>=0.16"],