Skip to content

Commit

Permalink
Test Python 3.12 (microsoft#1837)
Browse files Browse the repository at this point in the history
* Test Python 3.12

* Flake8 fix

* Caching bug
  • Loading branch information
adamjstewart authored Feb 6, 2024
1 parent 78d1854 commit 82e2559
Show file tree
Hide file tree
Showing 9 changed files with 17 additions and 16 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- name: Set up python
uses: actions/[email protected]
with:
python-version: '3.11'
python-version: '3.12'
- name: Cache dependencies
uses: actions/[email protected]
id: cache
Expand Down Expand Up @@ -44,7 +44,7 @@ jobs:
- name: Set up python
uses: actions/[email protected]
with:
python-version: '3.11'
python-version: '3.12'
- name: Cache dependencies
uses: actions/[email protected]
id: cache
Expand Down Expand Up @@ -72,7 +72,7 @@ jobs:
- name: Set up python
uses: actions/[email protected]
with:
python-version: '3.11'
python-version: '3.12'
- name: Cache dependencies
uses: actions/[email protected]
id: cache
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/style.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- name: Set up python
uses: actions/[email protected]
with:
python-version: '3.11'
python-version: '3.12'
- name: Cache dependencies
uses: actions/[email protected]
id: cache
Expand All @@ -43,7 +43,7 @@ jobs:
- name: Set up python
uses: actions/[email protected]
with:
python-version: '3.11'
python-version: '3.12'
- name: Cache dependencies
uses: actions/[email protected]
id: cache
Expand All @@ -68,7 +68,7 @@ jobs:
- name: Set up python
uses: actions/[email protected]
with:
python-version: '3.11'
python-version: '3.12'
- name: Cache dependencies
uses: actions/[email protected]
id: cache
Expand All @@ -93,7 +93,7 @@ jobs:
- name: Set up python
uses: actions/[email protected]
with:
python-version: '3.11'
python-version: '3.12'
- name: Cache dependencies
uses: actions/[email protected]
id: cache
Expand All @@ -118,7 +118,7 @@ jobs:
- name: Set up python
uses: actions/[email protected]
with:
python-version: '3.11'
python-version: '3.12'
- name: Cache dependencies
uses: actions/[email protected]
id: cache
Expand All @@ -143,7 +143,7 @@ jobs:
- name: Set up python
uses: actions/[email protected]
with:
python-version: '3.11'
python-version: '3.12'
- name: Cache dependencies
uses: actions/[email protected]
id: cache
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ['3.9', '3.10', '3.11']
python-version: ['3.9', '3.10', '3.11', '3.12']
steps:
- name: Clone repo
uses: actions/[email protected]
Expand All @@ -31,7 +31,7 @@ jobs:
with:
path: ${{ env.pythonLocation }}
key: ${{ env.pythonLocation }}-${{ hashFiles('requirements/required.txt') }}-${{ hashFiles('requirements/datasets.txt') }}-${{ hashFiles('requirements/tests.txt') }}
if: ${{ ! (runner.os == 'macOS' && matrix.python-version == '3.11') }}
if: ${{ ! (runner.os == 'macOS' && (matrix.python-version == '3.11' || matrix.python-version == '3.12')) }}
- name: Setup headless display for pyvista
uses: pyvista/setup-headless-display-action@v2
- name: Install apt dependencies (Linux)
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tutorials.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
- name: Set up python
uses: actions/[email protected]
with:
python-version: '3.11'
python-version: '3.12'
- name: Cache dependencies
uses: actions/[email protected]
id: cache
Expand Down
2 changes: 1 addition & 1 deletion .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ version: 2
build:
os: ubuntu-22.04
tools:
python: "3.11"
python: "3.12"

# Configuration of the Python environment to be used
python:
Expand Down
2 changes: 1 addition & 1 deletion experiments/torchgeo/run_resisc45_experiments.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def do_work(work: "Queue[str]", gpu_idx: int) -> bool:
for model, lr, loss, weights in itertools.product(
model_options, lr_options, loss_options, weight_options
):
experiment_name = f"{model}_{lr}_{loss}_{weights.replace('_','-')}"
experiment_name = f"{model}_{lr}_{loss}_{weights.replace('_', '-')}"

output_dir = os.path.join("output", "resisc45_experiments")
log_dir = os.path.join(output_dir, "logs")
Expand Down
2 changes: 1 addition & 1 deletion experiments/torchgeo/run_so2sat_experiments.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def do_work(work: "Queue[str]", gpu_idx: int) -> bool:
for model, lr, loss, weights in itertools.product(
model_options, lr_options, loss_options, weight_options
):
experiment_name = f"{model}_{lr}_{loss}_{weights.replace('_','-')}"
experiment_name = f"{model}_{lr}_{loss}_{weights.replace('_', '-')}"

output_dir = os.path.join("output", "so2sat_experiments")
log_dir = os.path.join(output_dir, "logs")
Expand Down
2 changes: 1 addition & 1 deletion experiments/torchgeo/run_so2sat_seed_experiments.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def do_work(work: "Queue[str]", gpu_idx: int) -> bool:
for model, lr, loss, weights, seed in itertools.product(
model_options, lr_options, loss_options, weight_options, seeds
):
experiment_name = f"{model}_{lr}_{loss}_{weights.replace('_','-')}_{seed}"
experiment_name = f"{model}_{lr}_{loss}_{weights.replace('_', '-')}_{seed}"

output_dir = os.path.join("output", "so2sat_seed_experiments")
log_dir = os.path.join(output_dir, "logs")
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ classifiers = [
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
"Topic :: Scientific/Engineering :: GIS",
]
Expand Down

0 comments on commit 82e2559

Please sign in to comment.