Metadata-Version: 2.4
Name: opake-engine
Version: 0.16.0
Summary: Opake torch substrate: pytree wrappers, clipping primitives, DDP plumbing, schedules, profiler, and noise-allocation math
Author: Opake Contributors
License: Apache-2.0
Keywords: differential-privacy,pytorch,privacy,machine-learning
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 :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Topic :: Security
Requires-Python: <3.14,>=3.11
Description-Content-Type: text/markdown
License-File: LICENSE
License-File: NOTICE
Requires-Dist: opake-base==0.16.0
Requires-Dist: numpy>=1.22
Requires-Dist: torch>=2.9.0
Requires-Dist: optree>=0.17.0
Dynamic: license-file

# opake-engine

Torch substrate for the Opake library. Ships everything that uses PyTorch
that downstream stacks (`opake-dpsgd`, `opake-dpftrl`,
`opake-auditing`, `opake-patches`, `opake-transformers`) need:

- `opake.api.engine.types` — `ClippedPytree`, `NoisedPytree`,
  `PerGroup`, `ClipState`, `NoiseState`, paired second-moment outputs.
- `opake.api.engine.pytree` — torch-pytree ops (`tree_map`,
  `partition`, `merge`, `global_norm`, …).
- `opake.api.engine.random` — `RngKey` (uint32 tensor), `key`,
  `split`, `fold_in`, `torch.Generator` helpers.
- `opake.api.engine.serialization` — `torch.Tensor` / `numpy.ndarray`
  handler registration with the base-side serialization registry.
- `opake.api.engine.distributed` — DDP collectives, sync registry,
  detection helpers.
- `opake.api.engine.noise_allocation` — per-group / paired-stream
  noise stddev math, shared between DP-SGD and DP-FTRL.
- `opake.api.engine.clipping` — fixed + AUTO-S clipping primitives
  (constant-sensitivity; usable by both DP-SGD and DP-FTRL).
- `opake.api.engine.functional` — `make_functional`,
  `with_batch_dim`, `empty_collate`.
- `opake.api.engine.scheduling` — step-indexed schedules + warmup /
  restarts composition.
- `opake.api.engine.profiling` — memory + step timer.

User-facing façades live at `opake.types`, `opake.pytree`,
`opake.random`, `opake.distributed`, `opake.functional`,
`opake.scheduling`, `opake.profiling`. **No `opake.clipping`
façade** — clipping is reached via stack façades
(`opake.dpsgd.clipping`, `opake.dpftrl.clipping`).
