Skip to content

Commit 7dedfd4

Browse files
committed
Separate backends, install only necessary in CI
1 parent 9f4bd7e commit 7dedfd4

File tree

3 files changed

+17
-5
lines changed

3 files changed

+17
-5
lines changed

.github/workflows/build.yml

+3-1
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,14 @@ jobs:
1717
uses: packetcoders/action-setup-cache-python-poetry@main
1818
with:
1919
python-version: '3.9'
20-
install-args: --with dev --with backends
20+
install-args: --with dev --with torch
2121

2222
- name: Install groco
2323
run: poetry install
2424

2525
- name: Generate test coverage
26+
env:
27+
KERAS_BACKEND: torch
2628
run: |
2729
poetry run pytest --cov
2830
poetry run coverage xml

.github/workflows/test.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
uses: packetcoders/action-setup-cache-python-poetry@main
2222
with:
2323
python-version: ${{ matrix.python-version }}
24-
install-args: --with dev --with backends
24+
install-args: --with dev --with ${{ matrix.backend }}
2525

2626
- name: Install groco
2727
run: poetry install

pyproject.toml

+13-3
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,23 @@ isort = "^5.13.2"
2121
pre-commit = "^3.6.2"
2222
Sphinx = "^7.2.6"
2323

24-
[tool.poetry.group.backends]
24+
[tool.poetry.group.tensorflow]
2525
optional = true
2626

27-
[tool.poetry.group.backends.dependencies]
27+
[tool.poetry.group.pytorch]
28+
optional = true
29+
30+
[tool.poetry.group.jax]
31+
optional = true
32+
33+
[tool.poetry.group.tensorflow.dependencies]
2834
tensorflow = "^2.16.1"
29-
jax = "^0.4.25"
35+
36+
[tool.poetry.group.torch.dependencies]
3037
torch = "^2.2.1"
38+
39+
[tool.poetry.group.jax.dependencies]
40+
jax = "^0.4.25"
3141
jaxlib = "^0.4.25"
3242

3343
[build-system]

0 commit comments

Comments
 (0)