-
Notifications
You must be signed in to change notification settings - Fork 62
[Bug, Update]: tf.keras.Sequential error, uv, ruff, python 3.10, 3.11, 3.12, 3.13 #178
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
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
972441d
[Bug]: tf.keras.Sequential error #177
quentin-possamai-alstom 845a570
Linting with ruff
quentin-possamai-alstom 1f3b2af
Pre-commit hook
quentin-possamai-alstom 8917f23
Updating doc to avoid messages from numkdoc
quentin-possamai-alstom 6bfd058
Integrating comments of the PR
quentin-possamai-alstom File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,26 +1,23 @@ | ||
| name: pylint | ||
| name: ruff | ||
|
|
||
| on: | ||
| pull_request: | ||
| workflow_dispatch: | ||
|
|
||
| jobs: | ||
| checks: | ||
| runs-on: ubuntu-22.04 | ||
| strategy: | ||
| max-parallel: 4 | ||
| matrix: | ||
| python-version: [3.7.14, 3.8, 3.9, "3.10"] | ||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v1 | ||
| - name: Set up Python ${{ matrix.python-version }} | ||
| uses: actions/setup-python@v2 | ||
| with: | ||
| python-version: ${{ matrix.python-version }} | ||
| - name: Install dependencies | ||
| run: | | ||
| python -m pip install --upgrade pip | ||
| pip install tox | ||
| - name: Check lint | ||
| run: tox -e py$(echo ${{ matrix.python-version }} | tr -d .)-lint | ||
| - uses: actions/checkout@v6 | ||
| - name: Set up Python 3.13 | ||
| uses: actions/setup-python@v6 | ||
| with: | ||
| python-version: 3.13 | ||
| - name: Set up uv | ||
| uses: astral-sh/setup-uv@v6 | ||
| - name: Install dependencies | ||
| run: | | ||
| uv pip install --system tox tox-uv | ||
| - name: Check lint | ||
| run: tox -e py313-lint |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
|
quentinpossamai marked this conversation as resolved.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,47 +1,69 @@ | ||
| name: tests for torch | ||
| name: tests torch | ||
|
|
||
| on: | ||
| pull_request: | ||
| workflow_dispatch: | ||
|
|
||
| jobs: | ||
| discover-tox-envs: | ||
| runs-on: ubuntu-latest | ||
| outputs: | ||
| matrix: ${{ steps.build-matrix.outputs.matrix }} | ||
| steps: | ||
| - uses: actions/checkout@v6 | ||
|
|
||
| - name: Set up Python (from pyproject) | ||
| uses: actions/setup-python@v6 | ||
| with: | ||
| python-version-file: pyproject.toml | ||
|
|
||
| - name: Set up uv | ||
| uses: astral-sh/setup-uv@v6 | ||
|
|
||
| - name: Install tox tooling | ||
| run: | | ||
| uv pip install --system tox tox-uv pytest | ||
|
|
||
| - name: Build matrix from tox.ini | ||
| id: build-matrix | ||
| run: | | ||
| python - <<'PY' | ||
| import json | ||
| import os | ||
| import subprocess | ||
|
|
||
| envs = subprocess.check_output(["tox", "-l"], text=True).splitlines() | ||
| envs = [e.strip() for e in envs if e.strip().startswith("py")] | ||
| envs = [e for e in envs if "-torch" in e] | ||
|
|
||
| matrix = {"toxenv": envs} | ||
| with open(os.environ["GITHUB_OUTPUT"], "a", encoding="utf-8") as f: | ||
| f.write(f"matrix={json.dumps(matrix)}\n") | ||
| PY | ||
|
|
||
| checks: | ||
| needs: discover-tox-envs | ||
| runs-on: ubuntu-latest | ||
| # The 'fail-fast' strategy option determines whether to cancel all in-progress jobs | ||
| # if any matrix job fails. When set to 'false', failed jobs do not cancel other | ||
| # running jobs, allowing all matrix combinations to complete independently. | ||
| # This is useful for testing across multiple configurations to see all failures. | ||
| strategy: | ||
| max-parallel: 4 | ||
| fail-fast: false | ||
|
quentinpossamai marked this conversation as resolved.
|
||
| matrix: | ||
| include: | ||
| - python-version: 3.8 | ||
| tf-version: 2.5 | ||
| torch-version: 1.11 | ||
| - python-version: 3.8 | ||
| tf-version: 2.8 | ||
| torch-version: 1.11 | ||
| - python-version: 3.8 | ||
| tf-version: 2.11 | ||
| torch-version: 1.11 | ||
| - python-version: 3.9 | ||
| tf-version: 2.8 | ||
| torch-version: 1.13 | ||
| - python-version: 3.9 | ||
| tf-version: 2.11 | ||
| torch-version: 1.13 | ||
| - python-version: "3.10" | ||
| tf-version: 2.8 | ||
| torch-version: 2.0.0 | ||
| - python-version: "3.10" | ||
| tf-version: 2.11 | ||
| torch-version: 2.0.0 | ||
| toxenv: ${{ fromJson(needs.discover-tox-envs.outputs.matrix).toxenv }} | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v1 | ||
| - name: Set up Python ${{ matrix.python-version }} | ||
| uses: actions/setup-python@v2 | ||
| with: | ||
| python-version: ${{ matrix.python-version }} | ||
| - name: Install dependencies | ||
| run: | | ||
| python -m pip install --upgrade pip | ||
| pip install tox | ||
| - name: Test with tox (Python ${{ matrix.python-version }} - TF ${{ matrix.tf-version }} - PyTorch ${{ matrix.torch-version }}) | ||
| run: tox -e py$(echo ${{ matrix.python-version }}-tf${{ matrix.tf-version }}-torch${{matrix.torch-version}} | tr -d .) | ||
| - uses: actions/checkout@v6 | ||
| - name: Set up uv | ||
| uses: astral-sh/setup-uv@v6 | ||
| - name: Create virtualenv and install tox | ||
| run: | | ||
| uv venv | ||
| . .venv/bin/activate | ||
| uv pip install --upgrade pip | ||
| uv pip install tox tox-uv | ||
| - name: Test with tox (${{ matrix.toxenv }}) | ||
| run: | | ||
| . .venv/bin/activate | ||
| tox -e ${{ matrix.toxenv }} | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,10 +1,18 @@ | ||
| repos: | ||
| - repo: https://github.com/pre-commit/pre-commit-hooks | ||
| rev: v4.0.1 | ||
| rev: v6.0.0 | ||
| hooks: | ||
| - id: trailing-whitespace | ||
| - id: check-added-large-files | ||
| - id: check-ast | ||
| - id: check-docstring-first | ||
| - id: check-merge-conflict | ||
| - id: end-of-file-fixer | ||
| - repo: https://github.com/astral-sh/ruff-pre-commit | ||
| rev: v0.15.2 | ||
| hooks: | ||
|
quentinpossamai marked this conversation as resolved.
|
||
| - id: ruff-check | ||
| args: [".", "--fix"] | ||
|
|
||
| - id: ruff-format | ||
| args: ["."] | ||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.