We'd love to accept your patches and contributions to this project.
Contributions to this project must be accompanied by a Contributor License Agreement (CLA). You (or your employer) retain the copyright to your contribution; this simply gives us permission to use and redistribute your contributions as part of the project.
If you or your current employer have already signed the Google CLA (even if it was for a different project), you probably don't need to do it again.
Visit https://cla.developers.google.com/ to see your current agreements or to sign a new one.
This project follows Google's Open Source Community Guidelines.
-
Install the package with development dependencies:
pip install -e ".[dev]" -
Install pre-commit hooks:
pre-commit install
Before submitting a pull request, please ensure your changes pass linting and unit tests.
-
Linting: We use Ruff for linting and formatting. Run it with:
ruff check . -
Unit tests: We use Pytest for unit tests. Run them with:
pytest
-
E2E tests: End-to-end tests run real workloads against a GKE cluster. They live in
tests/e2e/and are skipped by default unless explicitly enabled.Prerequisites:
- A GCP project with a provisioned GKE cluster (see Quick Start)
- Google Cloud SDK authenticated (
gcloud auth loginandgcloud auth application-default login) - GKE credentials configured:
gcloud container clusters get-credentials <KERAS_REMOTE_CLUSTER> --zone <KERAS_REMOTE_ZONE> --project <KERAS_REMOTE_PROJECT> - Test dependencies installed:
pip install -e ".[test,cli]"
Required environment variables:
Variable Required Default Description E2E_TESTSYes — Set to 1to enable e2e testsKERAS_REMOTE_PROJECTYes — Google Cloud project ID KERAS_REMOTE_ZONENo us-central1-aGKE cluster zone KERAS_REMOTE_CLUSTERNo keras-remoteGKE cluster name Run all e2e tests:
E2E_TESTS=1 KERAS_REMOTE_PROJECT=my-project python -m pytest tests/e2e/ -v -n auto
Run a specific test file:
E2E_TESTS=1 KERAS_REMOTE_PROJECT=my-project python -m pytest tests/e2e/cpu_execution_test.py -v
Drop
-n autoto run tests serially to make it easier to debug.
- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature - Commit your changes:
git commit -m 'Add amazing feature' - Push to the branch:
git push origin feature/amazing-feature - Open a Pull Request
All submissions, including submissions by project members, require review. We use GitHub pull requests for this purpose. Consult GitHub Help for more information on using pull requests.