Contributing
Getting started
git clone https://github.com/sup3rus3r/tensor-optix
cd tensor-optix
pip install -e ".[dev]"
Development rules
These rules exist to keep the library clean and portable.
- No algorithm-specific code in
core/. PPO, DQN, SAC, etc. must never be referenced incore/orloop_controller.py. - Gymnasium API only. Use
(obs, info) = env.reset()and(obs, reward, terminated, truncated, info) = env.step(). Never use the legacydoneflag. HyperparamSet.paramsis opaque. Core code must never read or hardcode specific key names.- Separation of concerns. The optimizer tunes hyperparameters.
PolicyManagerevolves models. Do not mix these. - Framework code stays in adapters. TF/Torch/JAX-specific code belongs in
adapters/<framework>/, not scattered through core.
Running tests
pytest tests/
All tests must pass before a PR is merged. Tests that require TensorFlow use pytest.importorskip("tensorflow") and are skipped automatically if TF is unavailable.
Submitting changes
- Fork the repo and create a branch from
main. - Make your changes.
- Add or update tests to cover your changes.
- Ensure
pytest tests/passes. - Open a pull request with a clear description of what changed and why.
Reporting bugs
Use the bug report issue template. Include a minimal reproducible example where possible.
Suggesting features
Use the feature request issue template. Frame requests in terms of use cases, not implementation - explain what problem you're solving.