Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setup: bump python & torch version #1098

Merged
merged 5 commits into from
Nov 26, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 2 additions & 6 deletions .github/workflows/develop_install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,11 @@ jobs:


matrix:
python_version: ['3.8', '3.9']
pytorch_version: ['1.9.1', '1.10.1', '1.11.0', '1.12.1', '1.13.0', '2.0.1', '2.1.0']
python_version: ['3.9', '3.10']
pytorch_version: ['1.11.0', '1.12.1', '1.13.0', '2.0.1', '2.1.0']
platform: ['windows-latest', 'ubuntu-latest', 'macos-latest']


exclude:
- pytorch_version: '1.9.1'
platform: 'macos-latest'



if: ${{ !github.event.pull_request.draft }}
Expand Down
7 changes: 2 additions & 5 deletions .github/workflows/end_to_end.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,12 @@ jobs:


matrix:
python_version: ['3.8', '3.9']
pytorch_version: ['1.9.1', '1.10.1', '1.11.0', '1.12.1', '1.13.0', '2.0.1', '2.1.0']
python_version: ['3.9', '3.10']
pytorch_version: ['1.11.0', '1.12.1', '1.13.0', '2.0.1', '2.1.0']
platform: ['windows-latest', 'ubuntu-latest', 'macos-latest']


exclude:
- pytorch_version: '1.9.1'
platform: 'macos-latest'

- platform: 'windows-latest'


Expand Down
9 changes: 1 addition & 8 deletions .github/workflows/examples_llm_pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,12 @@ jobs:


matrix:
python_version: ['3.8', '3.9']
python_version: ['3.9', '3.10']
pytorch_version: ['2.2.2', '2.3.1', '2.4.0']
platform: ['windows-latest', 'ubuntu-latest', 'macos-latest']
jit_status: ['jit_disabled', 'jit_enabled']


exclude:
- pytorch_version: '1.9.1'
platform: 'macos-latest'

- pytorch_version: '1.9.1'
jit_status: 'jit_enabled'



if: ${{ !github.event.pull_request.draft }}
Expand Down
11 changes: 2 additions & 9 deletions .github/workflows/examples_pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,12 @@ jobs:


matrix:
python_version: ['3.8', '3.9']
pytorch_version: ['1.9.1', '1.10.1', '1.11.0', '1.12.1', '1.13.0', '2.0.1', '2.1.0']
python_version: ['3.9', '3.10']
pytorch_version: ['1.11.0', '1.12.1', '1.13.0', '2.0.1', '2.1.0']
platform: ['windows-latest', 'ubuntu-latest', 'macos-latest']
jit_status: ['jit_disabled', 'jit_enabled']


exclude:
- pytorch_version: '1.9.1'
platform: 'macos-latest'

- pytorch_version: '1.9.1'
jit_status: 'jit_enabled'



if: ${{ !github.event.pull_request.draft }}
Expand Down
8 changes: 2 additions & 6 deletions .github/workflows/finn_integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,11 @@ jobs:


matrix:
python_version: ['3.8', '3.9']
pytorch_version: ['1.9.1', '1.10.1', '1.11.0', '1.12.1', '1.13.0', '2.0.1', '2.1.0']
python_version: ['3.9', '3.10']
pytorch_version: ['1.11.0', '1.12.1', '1.13.0', '2.0.1', '2.1.0']
platform: ['windows-latest', 'ubuntu-latest']


exclude:
- pytorch_version: '1.9.1'
platform: 'macos-latest'



if: ${{ !github.event.pull_request.draft }}
Expand Down
16 changes: 6 additions & 10 deletions .github/workflows/gen_github_actions.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
ENDTOEND_YML = 'end_to_end.yml'

# Reduced Test for PRs, except when a review is requested
PYTHON_VERSIONS_REDUCED = ('3.8',)
PYTHON_VERSIONS_REDUCED = ('3.9',)

PYTORCH_LIST_REDUCED = ["1.9.1", "1.13.0", "2.1.0"]
PYTORCH_LIST_REDUCED = ["1.11.0", "1.13.0", "2.1.0"]

PLATFORM_LIST_REDUCED = ['ubuntu-latest']

Expand All @@ -38,9 +38,9 @@
'jit_disabled',])])

# Data shared betwen Nox sessions and Github Actions, formatted as tuples
PYTHON_VERSIONS = ('3.8', '3.9')
PYTHON_VERSIONS = ('3.9', '3.10')

PYTORCH_VERSIONS = ('1.9.1', '1.10.1', '1.11.0', '1.12.1', '1.13.0', '2.0.1', '2.1.0')
PYTORCH_VERSIONS = ('1.11.0', '1.12.1', '1.13.0', '2.0.1', '2.1.0')
Giuseppe5 marked this conversation as resolved.
Show resolved Hide resolved
JIT_STATUSES = ('jit_disabled', 'jit_enabled')

# Data used only by Github Actions, formatted as lists or lists of ordered dicts
Expand All @@ -49,13 +49,9 @@

STRATEGY = od([('fail-fast', 'false')])

EXCLUDE_LIST = generate_exclusion_list([[
['pytorch_version', ['1.9.1']],
['platform', ['macos-latest']],]])
EXCLUDE_LIST = []

JIT_EXCLUDE_LIST = generate_exclusion_list([[['pytorch_version', ['1.9.1']],
['jit_status', [
'jit_enabled',]]]])
JIT_EXCLUDE_LIST = []

NOTEBOOK_EXCLUDE_LIST = generate_exclusion_list([[['platform', [
'macos-latest',]]]])
Expand Down
7 changes: 2 additions & 5 deletions .github/workflows/notebook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,12 @@ jobs:


matrix:
python_version: ['3.8', '3.9']
pytorch_version: ['1.9.1', '1.10.1', '1.11.0', '1.12.1', '1.13.0', '2.0.1', '2.1.0']
python_version: ['3.9', '3.10']
pytorch_version: ['1.11.0', '1.12.1', '1.13.0', '2.0.1', '2.1.0']
platform: ['windows-latest', 'ubuntu-latest', 'macos-latest']


exclude:
- pytorch_version: '1.9.1'
platform: 'macos-latest'

- platform: 'macos-latest'


Expand Down
8 changes: 2 additions & 6 deletions .github/workflows/ort_integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,11 @@ jobs:


matrix:
python_version: ['3.8', '3.9']
pytorch_version: ['1.9.1', '1.10.1', '1.11.0', '1.12.1', '1.13.0', '2.0.1', '2.1.0']
python_version: ['3.9', '3.10']
pytorch_version: ['1.11.0', '1.12.1', '1.13.0', '2.0.1', '2.1.0']
platform: ['windows-latest', 'ubuntu-latest', 'macos-latest']


exclude:
- pytorch_version: '1.9.1'
platform: 'macos-latest'



if: ${{ !github.event.pull_request.draft }}
Expand Down
11 changes: 2 additions & 9 deletions .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,12 @@ jobs:


matrix:
python_version: ['3.8', '3.9']
pytorch_version: ['1.9.1', '1.10.1', '1.11.0', '1.12.1', '1.13.0', '2.0.1', '2.1.0']
python_version: ['3.9', '3.10']
pytorch_version: ['1.11.0', '1.12.1', '1.13.0', '2.0.1', '2.1.0']
platform: ['windows-latest', 'ubuntu-latest', 'macos-latest']
jit_status: ['jit_disabled', 'jit_enabled']


exclude:
- pytorch_version: '1.9.1'
platform: 'macos-latest'

- pytorch_version: '1.9.1'
jit_status: 'jit_enabled'



if: ${{ !github.event.pull_request.draft }}
Expand Down
8 changes: 2 additions & 6 deletions .github/workflows/reduced_develop_install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,11 @@ jobs:


matrix:
python_version: ['3.8']
pytorch_version: ['1.9.1', '1.13.0', '2.1.0']
python_version: ['3.9']
pytorch_version: ['1.11.0', '1.13.0', '2.1.0']
platform: ['ubuntu-latest']


exclude:
- pytorch_version: '1.9.1'
platform: 'macos-latest'



if: ${{ !github.event.pull_request.draft }}
Expand Down
7 changes: 2 additions & 5 deletions .github/workflows/reduced_end_to_end.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,12 @@ jobs:


matrix:
python_version: ['3.8']
pytorch_version: ['1.9.1', '1.13.0', '2.1.0']
python_version: ['3.9']
pytorch_version: ['1.11.0', '1.13.0', '2.1.0']
platform: ['ubuntu-latest']


exclude:
- pytorch_version: '1.9.1'
platform: 'macos-latest'

- platform: 'windows-latest'


Expand Down
6 changes: 1 addition & 5 deletions .github/workflows/reduced_examples_llm_pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,12 @@ jobs:


matrix:
python_version: ['3.8']
python_version: ['3.9']
pytorch_version: ['2.4.0']
platform: ['ubuntu-latest']
jit_status: ['jit_disabled']


exclude:
- pytorch_version: '1.9.1'
platform: 'macos-latest'



if: ${{ !github.event.pull_request.draft }}
Expand Down
8 changes: 2 additions & 6 deletions .github/workflows/reduced_examples_pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,12 @@ jobs:


matrix:
python_version: ['3.8']
pytorch_version: ['1.9.1', '1.13.0', '2.1.0']
python_version: ['3.9']
pytorch_version: ['1.11.0', '1.13.0', '2.1.0']
platform: ['ubuntu-latest']
jit_status: ['jit_disabled']


exclude:
- pytorch_version: '1.9.1'
platform: 'macos-latest'



if: ${{ !github.event.pull_request.draft }}
Expand Down
8 changes: 2 additions & 6 deletions .github/workflows/reduced_finn_integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,11 @@ jobs:


matrix:
python_version: ['3.8']
pytorch_version: ['1.9.1', '1.13.0', '2.1.0']
python_version: ['3.9']
pytorch_version: ['1.11.0', '1.13.0', '2.1.0']
platform: ['ubuntu-latest']


exclude:
- pytorch_version: '1.9.1'
platform: 'macos-latest'



if: ${{ !github.event.pull_request.draft }}
Expand Down
7 changes: 2 additions & 5 deletions .github/workflows/reduced_notebook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,12 @@ jobs:


matrix:
python_version: ['3.8']
pytorch_version: ['1.9.1', '1.13.0', '2.1.0']
python_version: ['3.9']
pytorch_version: ['1.11.0', '1.13.0', '2.1.0']
platform: ['ubuntu-latest']


exclude:
- pytorch_version: '1.9.1'
platform: 'macos-latest'

- platform: 'macos-latest'


Expand Down
8 changes: 2 additions & 6 deletions .github/workflows/reduced_ort_integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,11 @@ jobs:


matrix:
python_version: ['3.8']
pytorch_version: ['1.9.1', '1.13.0', '2.1.0']
python_version: ['3.9']
pytorch_version: ['1.11.0', '1.13.0', '2.1.0']
platform: ['ubuntu-latest']


exclude:
- pytorch_version: '1.9.1'
platform: 'macos-latest'



if: ${{ !github.event.pull_request.draft }}
Expand Down
8 changes: 2 additions & 6 deletions .github/workflows/reduced_pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,12 @@ jobs:


matrix:
python_version: ['3.8']
pytorch_version: ['1.9.1', '1.13.0', '2.1.0']
python_version: ['3.9']
pytorch_version: ['1.11.0', '1.13.0', '2.1.0']
platform: ['ubuntu-latest']
jit_status: ['jit_disabled']


exclude:
- pytorch_version: '1.9.1'
platform: 'macos-latest'



if: ${{ !github.event.pull_request.draft }}
Expand Down
27 changes: 10 additions & 17 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,8 @@
EXAMPLES_LLM_PYTEST_PYTORCH_IDS = tuple([
f'pytorch_{i}' for i in EXAMPLES_LLM_PYTEST_PYTORCH_VERSIONS])
JIT_IDS = tuple([f'{i}'.lower() for i in JIT_STATUSES])
LSTM_EXPORT_MIN_PYTORCH = '1.10.1'

TORCHVISION_VERSION_DICT = {
'1.9.1': '0.10.1',
'1.10.1': '0.11.2',
'1.11.0': '0.12.0',
'1.12.1': '0.13.1',
'1.13.0': '0.14.0',
Expand Down Expand Up @@ -191,20 +188,16 @@ def tests_brevitas_notebook(session, pytorch):
install_pytorch(pytorch, session)
install_torchvision(pytorch, session)
session.install('--upgrade', '-e', '.[test, ort_integration, notebook]')
if version.parse(pytorch) >= version.parse(LSTM_EXPORT_MIN_PYTORCH):
session.run(
'pytest', '-n', 'logical', '-v', '--nbmake', '--nbmake-kernel=python3', 'notebooks')
else:
session.run(
'pytest',
'-n',
'logical',
'-v',
'--nbmake',
'--nbmake-kernel=python3',
'notebooks',
'--ignore',
'notebooks/quantized_recurrent.ipynb')
session.run(
'pytest',
'-n',
'logical',
'-v',
'--nbmake',
'--nbmake-kernel=python3',
'notebooks',
'--ignore',
'notebooks/quantized_recurrent.ipynb')


@nox.session(python=PYTHON_VERSIONS)
Expand Down
Loading