Skip to content

Commit

Permalink
Separate backends, install only necessary in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
APJansen committed Mar 19, 2024
1 parent 9f4bd7e commit 7dedfd4
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 5 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,14 @@ jobs:
uses: packetcoders/action-setup-cache-python-poetry@main
with:
python-version: '3.9'
install-args: --with dev --with backends
install-args: --with dev --with torch

- name: Install groco
run: poetry install

- name: Generate test coverage
env:
KERAS_BACKEND: torch
run: |
poetry run pytest --cov
poetry run coverage xml
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
uses: packetcoders/action-setup-cache-python-poetry@main
with:
python-version: ${{ matrix.python-version }}
install-args: --with dev --with backends
install-args: --with dev --with ${{ matrix.backend }}

- name: Install groco
run: poetry install
Expand Down
16 changes: 13 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,23 @@ isort = "^5.13.2"
pre-commit = "^3.6.2"
Sphinx = "^7.2.6"

[tool.poetry.group.backends]
[tool.poetry.group.tensorflow]
optional = true

[tool.poetry.group.backends.dependencies]
[tool.poetry.group.pytorch]
optional = true

[tool.poetry.group.jax]
optional = true

[tool.poetry.group.tensorflow.dependencies]
tensorflow = "^2.16.1"
jax = "^0.4.25"

[tool.poetry.group.torch.dependencies]
torch = "^2.2.1"

[tool.poetry.group.jax.dependencies]
jax = "^0.4.25"
jaxlib = "^0.4.25"

[build-system]
Expand Down

0 comments on commit 7dedfd4

Please sign in to comment.