Skip to content

Commit a7a3584

Browse files
authored
Add Python 3.13 to CI, modernize type hints now that 3.10 is the minimum supported Python (#28)
* bump lightning dev sha, minor doc cleanup, set CI to use python 3.13 * modernize type hints for python 3.10+) * automate test warnings cleanup process, enhance CI infra scripts with new options * adjust docs reqs and external role definitions for updated sphinx version * minor format fixes * prune commented warns
1 parent 8831869 commit a7a3584

58 files changed

Lines changed: 2235 additions & 614 deletions

Some content is hidden

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

.azure-pipelines/gpu-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ jobs:
4747
strategy:
4848
matrix:
4949
'PyTorch | latest':
50-
image: "speediedan/finetuning-scheduler:py3.12-pt2.10.0-pl2.6-azpl-init"
50+
image: "speediedan/finetuning-scheduler:py3.13-pt2.10.0-pl2.6-azpl-init"
5151
scope: ""
5252
# how long to run the job before automatically cancelling
5353
timeoutInMinutes: "100"

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ You can also fill out the list below manually.
4242
- Fine-Tuning Scheduler Version (e.g., 2.10.0):
4343
- Lightning Version (e.g., 2.6.0):
4444
- PyTorch Version (e.g., 2.10.0):
45-
- Python version (e.g., 3.12):
45+
- Python version (e.g., 3.13):
4646
- OS (e.g., Linux):
4747
- CUDA/cuDNN version:
4848
- GPU models and configuration:

.github/actions/install-ci-dependencies/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ inputs:
55
python_version:
66
description: "Python version to use"
77
required: false
8-
default: "3.12"
8+
default: "3.13"
99
use_oldest:
1010
description: "Whether to use oldest compatible versions (for testing min version support)"
1111
required: false

.github/copilot-instructions.md

Lines changed: 27 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
**Key Technologies:**
88

9-
- Python 3.9+ (CI tests on 3.9 and 3.12)
9+
- Python 3.9+ (CI tests on 3.10 and 3.13)
1010
- PyTorch 2.6.0+ with PyTorch Lightning ecosystem
1111
- Core deps: pytorch-lightning (standalone) or lightning (unified package), transformers
1212

@@ -281,7 +281,7 @@ src/fts_examples/ # Example experiments
281281
**File:** `.github/workflows/ci_test-full.yml`
282282

283283
**Triggers:** Push/PR to main, changes to source/test files
284-
**Platforms:** Ubuntu 22.04, Windows 2022, macOS 14 (Python 3.10, 3.12)
284+
**Platforms:** Ubuntu 22.04, Windows 2022, macOS 14 (Python 3.10, 3.13)
285285
**Timeout:** 90 minutes
286286

287287
**Matrix Strategy:**
@@ -342,42 +342,53 @@ tail -f `ls -rt /tmp/gen_fts_coverage_fts_* | tail -1`
342342
**Common coverage commands:**
343343

344344
```bash
345+
# Note: Both --repo-home and --repo_home work (backward compatible)
346+
345347
# Generate coverage with rebuild (fts_latest with stable PyTorch)
346348
~/repos/finetuning-scheduler/scripts/manage_standalone_processes.sh --use-nohup \
347349
~/repos/finetuning-scheduler/scripts/gen_fts_coverage.sh \
348-
--repo_home=${HOME}/repos/finetuning-scheduler \
349-
--target_env_name=fts_latest \
350+
--repo-home=${HOME}/repos/finetuning-scheduler \
351+
--target-env-name=fts_latest \
350352
--venv-dir=/mnt/cache/${USER}/.venvs
351353

352354
# Generate coverage without rebuild
353355
~/repos/finetuning-scheduler/scripts/manage_standalone_processes.sh --use-nohup \
354356
~/repos/finetuning-scheduler/scripts/gen_fts_coverage.sh \
355-
--repo_home=${HOME}/repos/finetuning-scheduler \
356-
--target_env_name=fts_latest \
357+
--repo-home=${HOME}/repos/finetuning-scheduler \
358+
--target-env-name=fts_latest \
357359
--venv-dir=/mnt/cache/${USER}/.venvs \
358-
--no_rebuild_base
360+
--no-rebuild-base
359361

360362
# Include experimental patch tests
361363
~/repos/finetuning-scheduler/scripts/manage_standalone_processes.sh --use-nohup \
362364
~/repos/finetuning-scheduler/scripts/gen_fts_coverage.sh \
363-
--repo_home=${HOME}/repos/finetuning-scheduler \
364-
--target_env_name=fts_latest \
365+
--repo-home=${HOME}/repos/finetuning-scheduler \
366+
--target-env-name=fts_latest \
367+
--venv-dir=/mnt/cache/${USER}/.venvs \
368+
--include-experimental
369+
370+
# Run all example tests (comprehensive validation)
371+
~/repos/finetuning-scheduler/scripts/manage_standalone_processes.sh --use-nohup \
372+
~/repos/finetuning-scheduler/scripts/gen_fts_coverage.sh \
373+
--repo-home=${HOME}/repos/finetuning-scheduler \
374+
--target-env-name=fts_latest \
365375
--venv-dir=/mnt/cache/${USER}/.venvs \
366-
--include_experimental
376+
--no-rebuild-base \
377+
--run-all-and-examples
367378

368379
# Generate coverage with oldest dependencies (Python 3.10, mirrors CI oldest matrix)
369380
~/repos/finetuning-scheduler/scripts/manage_standalone_processes.sh --use-nohup \
370381
~/repos/finetuning-scheduler/scripts/gen_fts_coverage.sh \
371-
--repo_home=${HOME}/repos/finetuning-scheduler \
372-
--target_env_name=fts_oldest \
382+
--repo-home=${HOME}/repos/finetuning-scheduler \
383+
--target-env-name=fts_oldest \
373384
--venv-dir=/mnt/cache/${USER}/.venvs \
374385
--oldest
375386

376387
# Generate coverage with oldest deps, skip special tests (faster CI-like run)
377388
~/repos/finetuning-scheduler/scripts/manage_standalone_processes.sh --use-nohup \
378389
~/repos/finetuning-scheduler/scripts/gen_fts_coverage.sh \
379-
--repo_home=${HOME}/repos/finetuning-scheduler \
380-
--target_env_name=fts_oldest \
390+
--repo-home=${HOME}/repos/finetuning-scheduler \
391+
--target-env-name=fts_oldest \
381392
--venv-dir=/mnt/cache/${USER}/.venvs \
382393
--oldest \
383394
--no-special
@@ -387,6 +398,8 @@ tail -f `ls -rt /tmp/gen_fts_coverage_fts_* | tail -1`
387398

388399
- `--oldest`: Uses Python 3.10 and `requirements/ci/requirements-oldest.txt` (mirrors CI oldest matrix)
389400
- `--no-special`: Skips `special_tests.sh` standalone and experimental patch tests (faster iteration)
401+
- `--run-all-and-examples`: Runs all example tests (both non-standalone and standalone marked)
402+
- `--allow-failures`: Continues test execution after failures (useful for validation workflows)
390403
- `--venv-dir`: Base directory for venvs (recommended: `/mnt/cache/${USER}/.venvs` for hardlink performance)
391404

392405
## Special Dependencies and Known Issues

.github/workflows/ci_test-full.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,17 +44,17 @@ jobs:
4444
fail-fast: false
4545
matrix:
4646
os: [ubuntu-22.04, windows-2022, macOS-14]
47-
python-version: ["3.10", "3.12"] # minimum, maximum
47+
python-version: ["3.10", "3.13"] # minimum, maximum
4848
# tests will include oldest and newest tested patch versions of pytorch
4949
requires: ["oldest", "latest"]
5050
release: ["latest"]
5151
exclude: # note that occasionally, the oldest PyTorch version does not support the latest python version
52-
- {os: ubuntu-22.04, python-version: "3.12", requires: "oldest"}
53-
- {os: windows-2022, python-version: "3.12", requires: "oldest"}
54-
- {os: macOS-14, python-version: "3.12", requires: "oldest"}
52+
- {os: ubuntu-22.04, python-version: "3.13", requires: "oldest"}
53+
- {os: windows-2022, python-version: "3.13", requires: "oldest"}
54+
- {os: macOS-14, python-version: "3.13", requires: "oldest"}
5555
# include:
5656
# # adding when using a release candidate
57-
# # - {os: ubuntu-22.04, python-version: "3.12", requires: "latest", release: "pre"}
57+
# # - {os: ubuntu-22.04, python-version: "3.13", requires: "latest", release: "pre"}
5858

5959
timeout-minutes: 90
6060
env:

.github/workflows/code-checks.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ jobs:
5353
- name: Install CI Dependencies
5454
uses: ./.github/actions/install-ci-dependencies
5555
with:
56-
python_version: "3.12"
56+
python_version: "3.13"
5757
use_commit_pin: "true"
5858
show_pip_list: "true"
5959

.github/workflows/copilot-setup-steps.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
- name: Install CI dependencies
2424
uses: ./.github/actions/install-ci-dependencies
2525
with:
26-
python_version: '3.12'
26+
python_version: '3.13'
2727
show_pip_list: 'true'
2828

2929
- name: Install pre-commit

.github/workflows/release-docker.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
fail-fast: false
3131
matrix:
3232
# initially building only the latest supported configuration
33-
python_version: ["3.12"]
33+
python_version: ["3.13"]
3434
pytorch_version: ["2.10.0"]
3535
cust_base: ["cu12.8.1-"]
3636
pl_version: ["2.6"]

.github/workflows/release-pypi.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
- uses: actions/checkout@v4
2929
- uses: actions/setup-python@v5
3030
with:
31-
python-version: '3.12'
31+
python-version: '3.13'
3232

3333
- name: Install dependencies
3434
run: >-

.readthedocs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ formats:
3939
build:
4040
os: ubuntu-22.04
4141
tools:
42-
python: "3.12"
42+
python: "3.13"
4343
apt_packages:
4444
- texlive-latex-extra
4545
- dvipng

0 commit comments

Comments
 (0)