Metadata-Version: 2.4
Name: pyzenith
Version: 0.1.4
Summary: Cross-Platform ML Optimization Framework with ONNX Interpreter
Author-email: Wahyu Ardiansyah <vibeswithkk@gmail.com>
Maintainer-email: Wahyu Ardiansyah <wahyu@zenith.dev>
License: Apache-2.0
Project-URL: Homepage, https://github.com/vibeswithkk/zenith
Project-URL: Documentation, https://zenith.dev/docs
Project-URL: Repository, https://github.com/vibeswithkk/zenith
Project-URL: Issues, https://github.com/vibeswithkk/zenith/issues
Keywords: machine-learning,deep-learning,optimization,compiler,pytorch,tensorflow,jax,onnx,cuda,inference
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: C++
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Topic :: Software Development :: Compilers
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: numpy>=1.20.0
Provides-Extra: onnx
Requires-Dist: onnx>=1.14.0; extra == "onnx"
Requires-Dist: onnxruntime>=1.15.0; extra == "onnx"
Provides-Extra: pytorch
Requires-Dist: torch>=2.0.0; extra == "pytorch"
Provides-Extra: tensorflow
Requires-Dist: tensorflow>=2.12.0; extra == "tensorflow"
Requires-Dist: tf2onnx>=1.14.0; extra == "tensorflow"
Provides-Extra: jax
Requires-Dist: jax>=0.4.0; extra == "jax"
Requires-Dist: jaxlib>=0.4.0; extra == "jax"
Provides-Extra: all
Requires-Dist: zenith-ml[jax,onnx,pytorch,tensorflow]; extra == "all"
Provides-Extra: dev
Requires-Dist: pytest>=7.0.0; extra == "dev"
Requires-Dist: pytest-cov>=4.0.0; extra == "dev"
Requires-Dist: black>=23.0.0; extra == "dev"
Requires-Dist: isort>=5.12.0; extra == "dev"
Requires-Dist: mypy>=1.0.0; extra == "dev"
Requires-Dist: ruff>=0.1.0; extra == "dev"
Dynamic: license-file

# Zenith

[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
[![Python](https://img.shields.io/badge/Python-3.9+-green.svg)](https://www.python.org/)
[![Coverage](https://img.shields.io/badge/Coverage-66%25-yellow.svg)]()
[![Tests](https://img.shields.io/badge/Tests-198%20passed-brightgreen.svg)]()

**Cross-Platform ML Optimization Framework**

A model-agnostic and hardware-agnostic unification and optimization framework for Machine Learning.

## Features

- Unified API for PyTorch, TensorFlow, JAX, and ONNX models
- Automatic graph optimizations (fusion, constant folding, dead code elimination)
- Multi-backend support (CPU, CUDA, ROCm, TPU)
- Mixed precision training and inference (FP16, BF16, INT8)
- Property-based testing with mathematical guarantees

## Installation

```bash
# Basic installation
pip install pyzenith

# With framework support
pip install pyzenith[onnx,pytorch,tensorflow,jax]

# Development installation
pip install -e ".[dev]"
```

## Quick Start

```python
import zenith
from zenith.core import GraphIR, DataType, Shape, TensorDescriptor

# Create a computation graph
graph = GraphIR(name="my_model")
graph.add_input(TensorDescriptor("x", Shape([1, 3, 224, 224]), DataType.Float32))

# Apply optimizations
from zenith.optimization import PassManager
pm = PassManager()
pm.add("constant_folding")
pm.add("dead_code_elimination")
optimized = pm.run(graph)
```

## Architecture

```
+-------------------------------------------------------------+
|                    Python User Interface                    |
+-------------------------------------------------------------+
|              Framework-Specific Adapters Layer              |
|          (PyTorch, TensorFlow, JAX -> ONNX -> IR)           |
+-------------------------------------------------------------+
|       Core Optimization & Compilation Engine (C++)          |
|  - High-Level Graph Optimizer & IR                          |
|  - Kernel Scheduler & Auto-Tuner                            |
|  - Mathematical Kernel Library                              |
+-------------------------------------------------------------+
|           Hardware Abstraction Layer (HAL)                  |
|              CPU (SIMD) | CUDA | ROCm | TPU                 |
+-------------------------------------------------------------+
```

## Documentation

- [API Reference](./docs/API.md)
- [Architecture](./docs/ARCHITECTURE.md)
- [Blueprint](./CetakBiru.md)

## Development

```bash
# Run tests
pytest tests/python/ -v

# Run with coverage
pytest tests/python/ --cov=zenith --cov-report=term-missing

# Security scan
bandit -r zenith/ -ll
```

## Current Status

- Phase 4: Quality Assurance & Documentation
- 198 tests passing
- 66% code coverage
- 0 HIGH severity security issues

## Author

**Wahyu Ardiansyah** - Lead Architect

## License

Apache License 2.0 - See [LICENSE](./LICENSE)
