Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions .github/workflows/actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ permissions:
contents: read

jobs:
build:
keras_2:
name: Test the code with Keras 2
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Set up Python 3.9
uses: actions/setup-python@v1
with:
Expand Down Expand Up @@ -43,15 +43,15 @@ jobs:
- name: Run integration tests
run: |
python pip_build.py --install && cd integration_tests && pytest .
multibackend:
keras_3:
name: Test the code with Keras 3
strategy:
fail-fast: false
matrix:
backend: [tensorflow, jax, torch]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Set up Python 3.9
uses: actions/setup-python@v1
with:
Expand All @@ -77,11 +77,11 @@ jobs:
KERAS_BACKEND: ${{ matrix.backend }}
run: |
pytest keras_nlp/
format:
check_format:
name: Check the code format
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Set up Python 3.9
uses: actions/setup-python@v1
with:
Expand Down
40 changes: 28 additions & 12 deletions .github/workflows/publish-to-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,31 @@ jobs:
name: Build and publish to PyPI
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Install dependencies
run: |
pip install -r requirements.txt --progress-bar off
- name: Build a binary wheel and a source tarball
run: >-
python pip_build.py
- name: Publish distribution to PyPI
if: startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@master
with:
password: ${{ secrets.PYPI_API_TOKEN }}
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.9
- name: Get pip cache dir
id: pip-cache
run: |
python -m pip install --upgrade pip setuptools
echo "::set-output name=dir::$(pip cache dir)"
- name: pip cache
uses: actions/cache@v2
with:
path: ${{ steps.pip-cache.outputs.dir }}
key: ${{ runner.os }}-pip-${{ hashFiles('setup.py') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install dependencies
run: |
pip install -r requirements.txt --progress-bar off
- name: Build a binary wheel and a source tarball
run: >-
python pip_build.py
- name: Publish distribution to PyPI
if: startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@master
with:
password: ${{ secrets.PYPI_API_TOKEN }}
4 changes: 2 additions & 2 deletions requirements-jax-cuda.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Tensorflow cpu-only version.
tf-nightly-cpu==2.16.0.dev20231107 # Pin a working nightly until rc0.
tensorflow-text-nightly==2.16.0.dev20231107 # Pin a working nightly until rc0.
tf-nightly-cpu==2.16.0.dev20231109 # Pin a working nightly until rc0.
tensorflow-text-nightly==2.16.0.dev20231109 # Pin a working nightly until rc0.

# Torch cpu-only version.
--extra-index-url https://download.pytorch.org/whl/cpu
Expand Down
4 changes: 2 additions & 2 deletions requirements-tensorflow-cuda.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Tensorflow with cuda support.
--extra-index-url https://pypi.nvidia.com
tf-nightly[and-cuda]==2.16.0.dev20231107 # Pin a working nightly until rc0.
tensorflow-text-nightly==2.16.0.dev20231107 # Pin a working nightly until rc0.
tf-nightly[and-cuda]==2.16.0.dev20231109 # Pin a working nightly until rc0.
tensorflow-text-nightly==2.16.0.dev20231109 # Pin a working nightly until rc0.

# Torch cpu-only version.
--extra-index-url https://download.pytorch.org/whl/cpu
Expand Down
4 changes: 2 additions & 2 deletions requirements-torch-cuda.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Tensorflow cpu-only version.
tf-nightly-cpu==2.16.0.dev20231107 # Pin a working nightly until rc0.
tensorflow-text-nightly==2.16.0.dev20231107 # Pin a working nightly until rc0.
tf-nightly-cpu==2.16.0.dev20231109 # Pin a working nightly until rc0.
tensorflow-text-nightly==2.16.0.dev20231109 # Pin a working nightly until rc0.

# Torch with cuda support.
--extra-index-url https://download.pytorch.org/whl/cu118
Expand Down
4 changes: 2 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Tensorflow.
tf-nightly-cpu==2.16.0.dev20231107 # Pin a working nightly until rc0.
tensorflow-text-nightly==2.16.0.dev20231107 # Pin a working nightly until rc0.
tf-nightly-cpu==2.16.0.dev20231109 # Pin a working nightly until rc0.
tensorflow-text-nightly==2.16.0.dev20231109 # Pin a working nightly until rc0.

# Torch.
--extra-index-url https://download.pytorch.org/whl/cpu
Expand Down