Skip to content

Add Keras v3 implementation #74

Add Keras v3 implementation

Add Keras v3 implementation #74

Workflow file for this run

# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: Python unit tests
on: [push, pull_request]
permissions:
contents: read
jobs:
build_pytorch_backend:
runs-on: ubuntu-latest
container:
image: pytorch/pytorch:2.3.1-cuda11.8-cudnn8-runtime
env:
KERAS_BACKEND: torch
volumes:
- my_docker_volume:/volume_mount
steps:
- uses: actions/checkout@v3
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8 pytest
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: set pythonpath
run: |
echo "PYTHONPATH=." >> $GITHUB_ENV
- name: Test with pytest
run: |
pytest ncps/tests/test_keras.py
build_tensorflow_backend:
runs-on: ubuntu-latest
container:
image: tensorflow/tensorflow:2.16.1
env:
KERAS_BACKEND: tensorflow
volumes:
- my_docker_volume:/volume_mount
steps:
- uses: actions/checkout@v3
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8 pytest
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: set pythonpath
run: |
echo "PYTHONPATH=." >> $GITHUB_ENV
- name: Test with pytest
run: |
pytest ncps/tests/test_keras.py