Skip to content

Commit 4a5e6ca

Browse files
authored
Merge branch 'master' into fix-pth-versions-ci
2 parents a7ff713 + 3ffd9f8 commit 4a5e6ca

File tree

173 files changed

+2779
-1906
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

173 files changed

+2779
-1906
lines changed

.git-blame-ignore-revs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Run this command to always ignore formatting commits in `git blame`
2+
# git config blame.ignoreRevsFile .git-blame-ignore-revs
3+
4+
# Run pre-commit to fix end-of-file-fixer and trailing-whitespace (#3418)
5+
fe5a29b6942829ff2870181b6c1a68ebd2af9add
6+
# Fix code style (#3423)
7+
f9e8ca106a0d3f386f26f3a9481fd2eb341999f0

.github/dependabot.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "github-actions"
4+
directory: "/"
5+
schedule:
6+
interval: "monthly"
7+
groups:
8+
github-actions:
9+
patterns:
10+
- "*"

.github/pr-labeler-config.yml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,55 +1,55 @@
11
# Add 'docker' to any changes within 'docker' folder or any subfolders
22
docker:
33
- changed-files:
4-
- any-glob-to-any-file: docker/**
4+
- any-glob-to-any-file: docker/**
55

66
# Add 'docs' to any changes within 'docs' folder
77
docs:
88
- changed-files:
9-
- any-glob-to-any-file: docs/**
9+
- any-glob-to-any-file: docs/**
1010

1111
# Add 'ci' to any changes in '.github' folder
1212
ci:
1313
- changed-files:
14-
- any-glob-to-any-file: .github/**
14+
- any-glob-to-any-file: .github/**
1515

1616
# Add 'examples' to any changes within 'examples' folder
1717
examples:
1818
- changed-files:
19-
- any-glob-to-any-file: examples/**
19+
- any-glob-to-any-file: examples/**
2020

2121
# Add 'base' to any changes within 'base' folder
2222
"module: base":
2323
- changed-files:
24-
- any-glob-to-any-file: ignite/base/**/*
24+
- any-glob-to-any-file: ignite/base/**/*
2525

2626
# Add 'contrib' to any changes within 'contrib' folder
2727
"module: contrib":
2828
- changed-files:
29-
- any-glob-to-any-file: ignite/contrib/**/*
29+
- any-glob-to-any-file: ignite/contrib/**/*
3030

3131
# Add 'distributed' to any changes within 'distributed' folder
3232
"module: distributed":
3333
- changed-files:
34-
- any-glob-to-any-file: ignite/distributed/**/*
34+
- any-glob-to-any-file: ignite/distributed/**/*
3535

3636
# Add 'engine' to any changes within 'engine' folder
3737
"module: engine":
3838
- changed-files:
39-
- any-glob-to-any-file: ignite/engine/**/*
39+
- any-glob-to-any-file: ignite/engine/**/*
4040

4141
# Add 'handlers' to any changes within 'handlers' folder
4242
"module: handlers":
4343
- changed-files:
44-
- any-glob-to-any-file: ignite/handlers/**/*
44+
- any-glob-to-any-file: ignite/handlers/**/*
4545

4646
# Add 'metrics' to any changes within 'metrics' folder
4747
"module: metrics":
4848
- changed-files:
49-
- any-glob-to-any-file: ignite/metrics/**/*
49+
- any-glob-to-any-file: ignite/metrics/**/*
5050

51-
-
51+
-
5252
# Add 'utils' to any changes within 'utils' module
5353
"module: utils":
5454
- changed-files:
55-
- any-glob-to-any-file: ignite/utils.py
55+
- any-glob-to-any-file: ignite/utils.py

.github/workflows/binaries-nightly-release.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,21 @@ jobs:
1010
build-publish:
1111
runs-on: ubuntu-latest
1212
steps:
13-
- uses: actions/checkout@v4
13+
- uses: actions/checkout@v5
1414

1515
- name: Setup Miniconda
16-
uses: conda-incubator/setup-miniconda@v2
16+
uses: conda-incubator/setup-miniconda@v3
1717
with:
1818
miniconda-version: "latest"
1919
python-version: "3.10"
20+
channels: defaults,pytorch-nightly
2021

2122
- name: Setup nightly version
2223
run: |
2324
sed -i "s/__version__ = \"\(.*\)\"/__version__ = \"\1.dev$(date -u +%Y%m%d)\"/g" ignite/__init__.py
2425
cat ignite/__init__.py
26+
sed -i "s/__version__ = \"\(.*\)\"/__version__ = \"\1.dev$(date -u +%Y%m%d)\"/g" conda.recipe/meta.yaml
27+
cat conda.recipe/meta.yaml
2528
2629
- name: Install dependencies
2730
shell: bash -l {0}
@@ -35,6 +38,7 @@ jobs:
3538
ANACONDA_TOKEN: ${{ secrets.ANACONDA_TOKEN }}
3639
UPLOAD_USER: "pytorch-nightly"
3740
run: |
41+
# Update version
3842
chmod +x ./conda.recipe/build_and_upload.sh
3943
./conda.recipe/build_and_upload.sh
4044
@@ -43,8 +47,8 @@ jobs:
4347
run: |
4448
# workaround to fix https://github.com/pytorch/ignite/issues/2373
4549
pip uninstall -y twine pkginfo
46-
pip install --upgrade --no-cache-dir twine 'pkginfo>=1.8.2'
47-
python setup.py sdist bdist_wheel
50+
pip install --upgrade --no-cache-dir hatch twine 'pkginfo>=1.8.2'
51+
hatch build
4852
twine --version
4953
twine check dist/*
5054
TWINE_USERNAME="${{ secrets.PYPI_USER }}" TWINE_PASSWORD="${{ secrets.PYPI_TOKEN }}" twine upload --verbose dist/*
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
name: Code Style Checks
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
- "*.*.*"
8+
paths:
9+
- "**.py"
10+
- "setup.cfg"
11+
- "requirements-dev.txt"
12+
- "pyproject.toml"
13+
- ".pre-commit-config.yaml"
14+
- ".github/workflows/code-style-checks.yml"
15+
- "!assets/**"
16+
- "!docker/**"
17+
- "!docs/**"
18+
- "!conda.recipe"
19+
pull_request:
20+
paths:
21+
- "**.py"
22+
- "setup.cfg"
23+
- "requirements-dev.txt"
24+
- "pyproject.toml"
25+
- ".pre-commit-config.yaml"
26+
- ".github/workflows/code-style-checks.yml"
27+
- "!assets/**"
28+
- "!docker/**"
29+
- "!docs/**"
30+
- "!conda.recipe"
31+
workflow_dispatch:
32+
33+
concurrency:
34+
# <workflow_name>-<branch_name>-<true || commit_sha (if branch is protected)>
35+
group: code-style-${{ github.ref_name }}-${{ !(github.ref_protected) || github.sha }}
36+
cancel-in-progress: true
37+
38+
jobs:
39+
code-style:
40+
runs-on: ubuntu-latest
41+
strategy:
42+
matrix:
43+
python-version: ["3.9", "3.13"]
44+
45+
steps:
46+
- uses: actions/checkout@v5
47+
48+
- uses: astral-sh/setup-uv@v6
49+
with:
50+
version: "latest"
51+
python-version: ${{ matrix.python-version }}
52+
activate-environment: true
53+
enable-cache: true
54+
cache-dependency-glob: |
55+
**/requirements-dev.txt
56+
**/pyproject.toml
57+
58+
- name: Install dependencies
59+
run: |
60+
uv pip install pre-commit
61+
uv pip install -r requirements-dev.txt
62+
uv pip install -e .
63+
64+
- name: Run pre-commit checks
65+
run: pre-commit run --all-files --show-diff-on-failure

.github/workflows/code-style.yml

Lines changed: 0 additions & 36 deletions
This file was deleted.

.github/workflows/discord_issues.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77
workflow_dispatch:
88
inputs:
99
issue_number:
10-
description: 'Issue number'
10+
description: "Issue number"
1111
required: true
1212

1313
permissions:
@@ -26,5 +26,3 @@ jobs:
2626
issue_number: ${{ github.event.inputs.issue_number || github.event.issue.number }}
2727
issue_comment: Hey 👋, I've just created a [thread]($THREAD_LINK$) for this issue on [PyTorch-Ignite Discord](https://pytorch-ignite.ai/chat) where you can quickly talk to the community on the topic.
2828
discord_message: New issue created in `${{ github.repository }}`:<https://github.com/${{ github.repository }}/issues/${{ github.event.issue.number }}>
29-
30-

.github/workflows/discord_pull_requests.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77
workflow_dispatch:
88
inputs:
99
pull_request_number:
10-
description: 'Pull request number'
10+
description: "Pull request number"
1111
required: true
1212

1313
permissions:
@@ -26,4 +26,3 @@ jobs:
2626
issue_number: ${{ github.event.inputs.pull_request_number || github.event.pull_request.number }}
2727
issue_comment: Hey 👋, I've just created a [thread]($THREAD_LINK$) for this pull request on [PyTorch-Ignite Discord](https://pytorch-ignite.ai/chat) where you can quickly talk to the community on the topic.
2828
discord_message: New PR created in `${{ github.repository }}`:<https://github.com/${{ github.repository }}/pull/${{ github.event.pull_request_number || github.event.pull_request.number }}>
29-

.github/workflows/docker-build.yml

Lines changed: 10 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,12 @@ on:
99
types: [published]
1010
workflow_dispatch:
1111

12-
1312
concurrency:
1413
# <workflow_name>-<branch_name>-<true || commit_sha (if branch is protected)>
1514
group: docker-build-publish-${{ github.ref_name }}-${{ !(github.ref_protected) || github.sha }}
1615
cancel-in-progress: true
1716

1817
jobs:
19-
2018
setup:
2119
name: Setup
2220
runs-on: ubuntu-latest
@@ -26,11 +24,11 @@ jobs:
2624
hvd_version: ${{ steps.set-versions.outputs.hvd_version }}
2725
msdp_version: ${{ steps.set-versions.outputs.msdp_version }}
2826
steps:
29-
- uses: actions/checkout@v4
27+
- uses: actions/checkout@v5
3028
- name: Changed Files Exporter
3129
if: github.event_name == 'pull_request'
3230
id: files
33-
uses: umani/changed-files@v4.1.0
31+
uses: umani/changed-files@v4.2.0
3432
with:
3533
repo-token: ${{ secrets.GITHUB_TOKEN }}
3634
- name: Get a list of modified files
@@ -46,7 +44,6 @@ jobs:
4644
echo "pth_version=$(python -c "import configparser; cfg=configparser.ConfigParser(); cfg.read('docker.cfg'); print(cfg.get('DEFAULT', 'build_docker_image_pytorch_version'))")" >> $GITHUB_OUTPUT
4745
echo "hvd_version=$(python -c "import configparser; cfg=configparser.ConfigParser(); cfg.read('docker.cfg'); print(cfg.get('DEFAULT', 'build_docker_image_hvd_version'))")" >> $GITHUB_OUTPUT
4846
49-
5047
build-hvd:
5148
name: Build all Horovod flavoured PyTorch-Ignite images
5249
needs: setup
@@ -66,7 +63,7 @@ jobs:
6663
echo "::endgroup::"
6764
6865
- name: Checkout repository (pytorch/test-infra)
69-
uses: actions/checkout@v3
66+
uses: actions/checkout@v5
7067
with:
7168
# Support the use case where we need to checkout someone's fork
7269
repository: pytorch/test-infra
@@ -76,7 +73,7 @@ jobs:
7673
uses: ./test-infra/.github/actions/setup-linux
7774

7875
- name: Checkout repository (${{ github.repository }})
79-
uses: actions/checkout@v3
76+
uses: actions/checkout@v5
8077
with:
8178
# Support the use case where we need to checkout someone's fork
8279
repository: ${{ github.repository }}
@@ -106,7 +103,6 @@ jobs:
106103
bash push_all.sh hvd-vision
107104
bash push_all.sh hvd-nlp
108105
109-
110106
build-hvd-apex:
111107
name: Build all Horovod + Apex flavoured PyTorch-Ignite images
112108
needs: setup
@@ -126,7 +122,7 @@ jobs:
126122
echo "::endgroup::"
127123
128124
- name: Checkout repository (pytorch/test-infra)
129-
uses: actions/checkout@v3
125+
uses: actions/checkout@v5
130126
with:
131127
# Support the use case where we need to checkout someone's fork
132128
repository: pytorch/test-infra
@@ -136,7 +132,7 @@ jobs:
136132
uses: ./test-infra/.github/actions/setup-linux
137133

138134
- name: Checkout repository (${{ github.repository }})
139-
uses: actions/checkout@v3
135+
uses: actions/checkout@v5
140136
with:
141137
# Support the use case where we need to checkout someone's fork
142138
repository: ${{ github.repository }}
@@ -166,7 +162,6 @@ jobs:
166162
bash push_all.sh hvd-apex-vision
167163
bash push_all.sh hvd-apex-nlp
168164
169-
170165
build-main:
171166
name: Build all PyTorch-Ignite images
172167
needs: setup
@@ -186,7 +181,7 @@ jobs:
186181
echo "::endgroup::"
187182
188183
- name: Checkout repository (pytorch/test-infra)
189-
uses: actions/checkout@v3
184+
uses: actions/checkout@v5
190185
with:
191186
# Support the use case where we need to checkout someone's fork
192187
repository: pytorch/test-infra
@@ -196,7 +191,7 @@ jobs:
196191
uses: ./test-infra/.github/actions/setup-linux
197192

198193
- name: Checkout repository (${{ github.repository }})
199-
uses: actions/checkout@v3
194+
uses: actions/checkout@v5
200195
with:
201196
# Support the use case where we need to checkout someone's fork
202197
repository: ${{ github.repository }}
@@ -226,7 +221,6 @@ jobs:
226221
bash push_all.sh vision
227222
bash push_all.sh nlp
228223
229-
230224
build-main-apex:
231225
name: Build all PyTorch-Ignite images with Apex
232226
needs: setup
@@ -246,7 +240,7 @@ jobs:
246240
echo "::endgroup::"
247241
248242
- name: Checkout repository (pytorch/test-infra)
249-
uses: actions/checkout@v3
243+
uses: actions/checkout@v5
250244
with:
251245
# Support the use case where we need to checkout someone's fork
252246
repository: pytorch/test-infra
@@ -256,7 +250,7 @@ jobs:
256250
uses: ./test-infra/.github/actions/setup-linux
257251

258252
- name: Checkout repository (${{ github.repository }})
259-
uses: actions/checkout@v3
253+
uses: actions/checkout@v5
260254
with:
261255
# Support the use case where we need to checkout someone's fork
262256
repository: ${{ github.repository }}

0 commit comments

Comments
 (0)