Skip to content

build(deps): update torchmetrics requirement from <1.5.0,>=0.8.0 to >=0.8.0,<1.7.0 #1038

build(deps): update torchmetrics requirement from <1.5.0,>=0.8.0 to >=0.8.0,<1.7.0

build(deps): update torchmetrics requirement from <1.5.0,>=0.8.0 to >=0.8.0,<1.7.0 #1038

Workflow file for this run

name: PyPI Release
# https://help.github.com/en/actions/reference/events-that-trigger-workflows
on: # Trigger the workflow on push or pull request, but only for the main branch
push:
tags: ["*"]
pull_request: {}
# based on https://github.com/pypa/gh-action-pypi-publish
jobs:
publish-package:
runs-on: "ubuntu-22.04"
outputs:
version: ${{ steps.parse.outputs.tag }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: 3.8
- name: Install dependencies
run: python -m pip install -U setuptools wheel build
- name: Build package
run: python -m build
- name: parse tag
id: parse
run: echo "tag=${GITHUB_REF#refs/*/}" >> $GITHUB_OUTPUT
# We do this, since failures on test.pypi aren't that bad
#- name: Publish to Test PyPI
# if: startsWith(github.event.ref, 'refs/tags') || github.event_name == 'release'
# uses: pypa/[email protected]
# with:
# user: __token__
# password: ${{ secrets.test_pypi_password }}
# repository_url: https://test.pypi.org/legacy/
- name: Publish distribution 📦 to PyPI
if: startsWith(github.ref, 'refs/tags/') && github.event_name != 'pull_request'
uses: pypa/[email protected]
with:
user: __token__
password: ${{ secrets.pypi_password }}
bump-docs:
runs-on: "ubuntu-22.04"
needs: publish-package
if: github.event_name != 'pull_request'
env:
TAG: ${{ needs.publish-package.outputs.version }}
steps:
- uses: actions/checkout@v4
with:
repository: Lightning-AI/lightning
token: ${{ secrets.PAT_GHOST }}
- name: Bump the version in docs
run: |
import os, re
tag = os.environ.get("TAG", "???")
fpath = "docs/source-pytorch/conf.py"
with open(fpath, "r") as fp:
conf = fp.readlines()
found = False
for i, ln in enumerate(conf):
if "lightning-Habana" in ln:
found = True
if found and "checkout=" in ln:
ln = re.sub(r'checkout=".+"', f'checkout="{tag}"', ln)
conf[i] = ln
break
else:
raise RuntimeError(f"Failed to find checkout= for `lightning-Habana` in {fpath}")
with open(fpath, "w") as fp:
fp.writelines(conf)
shell: python
- name: Create Pull Request
if: startsWith(github.ref, 'refs/tags/')
uses: peter-evans/create-pull-request@v7
with:
title: "docs: Bump HPU ref `${{ env.TAG }}`"
committer: GitHub <[email protected]>
author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>
token: ${{ secrets.PAT_GHOST }}
commit-message: "bumping HPU version -> (${{ env.TAG }})"
branch: "docs/hpu-${{ env.TAG }}"
# Delete the branch when closing pull requests, and when undeleted after merging.
delete-branch: true
# the PR"s body/content
body: >
**This is automated update with the latest HPU
[release](https://github.com/Lightning-AI/lightning-habana/releases/tag/${{ env.TAG }})!**
Go to `docs/source-pytorch/conf.py`
and find section `assist_local.AssistantCLI.pull_docs_files(...` for Habana
and bump the reference to `${{ env.TAG }}`
Please, proceed with this update in timely manner...
assignees: |
jerome-habana
borda
reviewers: |
awaelchli
borda