The Core AI Optimization source code is open source under the BSD-3-Clause license. Contributions are welcome within a defined scope — please read this document before opening a pull request or issue.
The API surface is intentionally limited. This keeps the library reliable, well-tested, and maintainable.
- Reporting bugs with clear, reproducible steps
- Improving documentation
- Adding or improving tests for existing functionality
- Bug fixes for existing behavior
- Minor enhancements to existing extension points
Not in scope at this time:
- Major new features or algorithms — the maintainers make deliberate decisions about what enters the library. If you want to propose a new algorithm or major capability, please open a Feature request first. Maintainers will be transparent about whether it fits the roadmap.
- Changes to the core API surface
Set up the environment as described in README.md. Then, from the activated venv:
# Build the package.
make build
# Build the documentation.
make docs
# Build the documentation and open it in a browser.
make docs-openAll make targets and their flags are listed in the Makefile.
Before opening an issue:
- Search existing issues to avoid duplicates
- Provide a clear, concise description with code examples where applicable
- For security issues, do not open a public GitHub issue. Follow the Apple Open Source security disclosure process.
All contributions require tests.
- Before submitting: Ensure all existing tests pass locally. See README.md for instructions.
- New functionality: New features and bug fixes require corresponding automated tests.
- Numerical accuracy: For changes that affect model output, include a test that validates the result is correct.
The project follows the conventions in the Code Style Guide. Highlights:
- Python 3.11+
- PEP 8 style, enforced by
ruff - 100-character line limit
- Google-style docstrings
Commit messages should follow the Conventional Commits style.
Before pushing your changes, run these locally:
pre-commit run --all-files— formatters, linters, and license-header checks (also run automatically ongit commit)make check— full lint andmypytype-check passmake test— full test suite (parallelized withpytest-xdist)make test-fast— excludes tests marked@pytest.mark.slowfor quicker iterationmake test-smoke— builds the package, installs it into a clean environment, and verifies that imports plus basic quantization and palettization work end to end
A clean make check and make test are required before a pull request will be reviewed.
Issues and pull requests are addressed on a best-effort basis. Response times vary with team bandwidth and the scope of the contribution.
This project follows the Apple Open Source Code of Conduct. All community members are expected to adhere to these guidelines.