Skip to content

Commit

Permalink
Update CI to use keras-core from pypi
Browse files Browse the repository at this point in the history
  • Loading branch information
mattdangerw committed Jul 10, 2023
1 parent 0bf113c commit c278eb8
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 19 deletions.
22 changes: 3 additions & 19 deletions .github/workflows/actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,16 +37,8 @@ jobs:
env:
SSH_AUTH_SOCK: /tmp/ssh_agent.sock
run: |
pip install tensorflow==2.12.0
pip install torch>=2.0.1+cpu
pip install "jax[cpu]"
pip install -r requirements.txt --progress-bar off
pip install -e "." --progress-bar off
cd ..
git clone git@github.com:keras-team/keras-core.git
pip install -r keras-core/requirements.txt --progress-bar off
python keras-core/pip_build.py --install
cd keras-nlp
pip install --no-deps -e "." --progress-bar off
- name: Test with pytest
run: |
pytest --cov=keras_nlp --cov-report xml:coverage.xml keras_nlp/
Expand Down Expand Up @@ -88,16 +80,8 @@ jobs:
env:
SSH_AUTH_SOCK: /tmp/ssh_agent.sock
run: |
pip install tensorflow==2.12.0
pip install torch>=2.0.1+cpu
pip install "jax[cpu]"
pip install -r requirements.txt --progress-bar off
pip install -e "." --progress-bar off
cd ..
git clone git@github.com:keras-team/keras-core.git
pip install -r keras-core/requirements.txt --progress-bar off
python keras-core/pip_build.py --install
cd keras-nlp
pip install --no-deps -e "." --progress-bar off
- name: Test with pytest
env:
KERAS_BACKEND: ${{ matrix.backend }}
Expand Down Expand Up @@ -127,6 +111,6 @@ jobs:
- name: Install dependencies
run: |
pip install -r requirements.txt --progress-bar off
pip install -e "." --progress-bar off
pip install --no-deps -e "." --progress-bar off
- name: Lint
run: bash shell/lint.sh
5 changes: 5 additions & 0 deletions requirements-common.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
keras-core
# Consider handling GPU here.
torch>=2.0.1+cpu
jax[cpu]
# Tooling.
astor
numpy~=1.23.2 # Numpy 1.24 breaks tests on ragged tensors
Expand All @@ -11,6 +15,7 @@ pytest-cov
build
namex
regex
rich
# Optional deps.
rouge-score
sentencepiece
2 changes: 2 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,12 @@ def get_version(rel_path):
author_email="keras-nlp@google.com",
license="Apache License 2.0",
install_requires=[
"keras-core",
"absl-py",
"numpy",
"packaging",
"regex",
"rich",
# Don't require tensorflow-text on MacOS, there are no binaries for ARM.
# Also, we rely on tensorflow *transitively* through tensorflow-text.
# This avoid a slowdown during `pip install keras-nlp` where pip would
Expand Down

0 comments on commit c278eb8

Please sign in to comment.