Skip to content

Commit 7b288ba

Browse files
committed
Update CI to use keras-core from pypi (#1124)
1 parent 9dac96e commit 7b288ba

File tree

4 files changed

+11
-27
lines changed

4 files changed

+11
-27
lines changed

.github/workflows/actions.yml

Lines changed: 3 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -37,16 +37,8 @@ jobs:
3737
env:
3838
SSH_AUTH_SOCK: /tmp/ssh_agent.sock
3939
run: |
40-
pip install tensorflow==2.12.0
41-
pip install torch>=2.0.1+cpu
42-
pip install "jax[cpu]"
4340
pip install -r requirements.txt --progress-bar off
44-
pip install -e "." --progress-bar off
45-
cd ..
46-
git clone [email protected]:keras-team/keras-core.git
47-
pip install -r keras-core/requirements.txt --progress-bar off
48-
python keras-core/pip_build.py --install
49-
cd keras-nlp
41+
pip install --no-deps -e "." --progress-bar off
5042
- name: Test with pytest
5143
run: |
5244
pytest --cov=keras_nlp --cov-report xml:coverage.xml keras_nlp/
@@ -88,16 +80,8 @@ jobs:
8880
env:
8981
SSH_AUTH_SOCK: /tmp/ssh_agent.sock
9082
run: |
91-
pip install tensorflow==2.12.0
92-
pip install torch>=2.0.1+cpu
93-
pip install "jax[cpu]"
9483
pip install -r requirements.txt --progress-bar off
95-
pip install -e "." --progress-bar off
96-
cd ..
97-
git clone [email protected]:keras-team/keras-core.git
98-
pip install -r keras-core/requirements.txt --progress-bar off
99-
python keras-core/pip_build.py --install
100-
cd keras-nlp
84+
pip install --no-deps -e "." --progress-bar off
10185
- name: Test with pytest
10286
env:
10387
KERAS_BACKEND: ${{ matrix.backend }}
@@ -127,6 +111,6 @@ jobs:
127111
- name: Install dependencies
128112
run: |
129113
pip install -r requirements.txt --progress-bar off
130-
pip install -e "." --progress-bar off
114+
pip install --no-deps -e "." --progress-bar off
131115
- name: Lint
132116
run: bash shell/lint.sh

.github/workflows/publish-to-pypi.yml

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,8 @@ jobs:
1818
SSH_AUTH_SOCK: /tmp/ssh_agent.sock
1919
- name: Install dependencies
2020
run: |
21-
pip install tensorflow==2.12.0
22-
pip install torch>=2.0.1+cpu
23-
pip install "jax[cpu]"
2421
pip install -r requirements.txt --progress-bar off
25-
cd ..
26-
git clone [email protected]:keras-team/keras-core.git
27-
pip install -r keras-core/requirements.txt --progress-bar off
28-
python keras-core/pip_build.py --install
29-
cd keras-nlp
22+
pip install --no-deps -e "." --progress-bar off
3023
- name: Build a binary wheel and a source tarball
3124
run: >-
3225
python pip_build.py

requirements-common.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
keras-core
2+
# Consider handling GPU here.
3+
torch>=2.0.1+cpu
4+
jax[cpu]
15
# Tooling.
26
astor
37
numpy~=1.23.2 # Numpy 1.24 breaks tests on ragged tensors
@@ -11,6 +15,7 @@ pytest-cov
1115
build
1216
namex
1317
regex
18+
rich
1419
# Optional deps.
1520
rouge-score
1621
sentencepiece

setup.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,12 @@ def get_version(rel_path):
5151
author_email="[email protected]",
5252
license="Apache License 2.0",
5353
install_requires=[
54+
"keras-core",
5455
"absl-py",
5556
"numpy",
5657
"packaging",
5758
"regex",
59+
"rich",
5860
# Don't require tensorflow-text on MacOS, there are no binaries for ARM.
5961
# Also, we rely on tensorflow *transitively* through tensorflow-text.
6062
# This avoid a slowdown during `pip install keras-nlp` where pip would

0 commit comments

Comments
 (0)