How markean/aimz works
aimz is a Python library for scalable probabilistic impact modeling. A user supplies a NumPyro kernel and data to ImpactModel, fits it, then requests predictions or intervention effects. Internally, input preparation and sharding feed forward sampling; streaming coordinates chunked output, which is stored in Zarr or accumulated in memory and formatted as Xarray trees. The graph also preserves the documented MLflow tracking capability. Some subsystem links rely on the SOURCE INDEX or README because excerpts are partial; unsampled implementation details are not assumed.
Main entry points: impact_model.py ImpactModel · _streaming.py Streaming runtime · _input_setup.py Input preparation · _forward.py Forward sampling
Components 19
Modeling and inference
- ImpactModel
aimz/model/impact_model.py - Kernel metadata
aimz/model/kernel_spec.py - Inference core
aimz/model/_core.py - Validation
aimz/utils/_validation.py - Warnings and errors
aimz/_exceptions.py
Sampling and streaming
- Streaming runtime
aimz/model/_streaming.py - Forward sampling
aimz/sampling/_forward.py - Sharded execution
aimz/utils/data/_sharding.py
Data and results
- Input preparation
aimz/utils/data/_input_setup.py - Kernel arguments
aimz/utils/_kwargs.py - Array dataset
aimz/utils/data/array_dataset.py - Array loader
aimz/utils/data/array_loader.py - Output writer
aimz/utils/_output.py - Zarr store
- Xarray formatting
aimz/utils/_format.py
Experiment tracking
- MLflow integration
aimz/mlflow/__init__.py
Other components
- Modeling user
- NumPyro and JAX
- MLflow
Connections 24
- Modeling user → ImpactModel: configures and calls
README.md - Modeling user → NumPyro and JAX: defines kernel
README.md - ImpactModel → Inference core: delegates inference
aimz/model/impact_model.py - ImpactModel → Kernel metadata: uses metadata
aimz/model/impact_model.py - ImpactModel → Validation: validates inputs
aimz/model/impact_model.py - ImpactModel → Streaming runtime: runs streaming
aimz/model/impact_model.py - ImpactModel → Forward sampling: requests sampling
aimz/model/impact_model.py - ImpactModel → Input preparation: prepares inputs
aimz/model/impact_model.py - ImpactModel → Xarray formatting: formats results
aimz/model/impact_model.py - Streaming runtime → Input preparation: opens input stream
aimz/model/_streaming.py - Streaming runtime → Forward sampling: computes samples
aimz/model/_streaming.py - Streaming runtime → Sharded execution: uses sharding
aimz/model/_streaming.py - Streaming runtime → Kernel arguments: partitions arguments
aimz/model/_streaming.py - Streaming runtime → Output writer: dispatches output
aimz/model/_streaming.py - Forward sampling → NumPyro and JAX: traces kernel
aimz/sampling/_forward.py - Sharded execution → Forward sampling: invokes sampler
aimz/utils/data/_sharding.py - Input preparation → Kernel arguments: groups arguments
aimz/utils/data/_input_setup.py - Input preparation → Array loader: uses loader
aimz/utils/data/_input_setup.py - Array loader → Array dataset: wraps dataset
aimz/utils/data/array_loader.py - Output writer → Zarr store: writes chunks
aimz/utils/_output.py - Output writer → Xarray formatting: uses formatting
aimz/utils/_output.py - Xarray formatting → Zarr store: loads stored output
aimz/utils/_format.py - ImpactModel → MLflow integration: tracked by integration
aimz/mlflow/__init__.py - MLflow integration → MLflow: logs runs
README.md