Metadata-Version: 2.4
Name: kaizo
Version: 0.0.2
Summary: A modular YML config file parser and runner.
Author-email: Mohammad Ghazanfari <mgh.5225@gmail.com>
Project-URL: Homepage, https://github.com/NaughtFound/kaizo
Project-URL: Source, https://github.com/NaughtFound/kaizo
Project-URL: Issues, https://github.com/NaughtFound/kaizo/issues
Project-URL: Changelog, https://github.com/NaughtFound/kaizo/blob/main/CHANGELOG.md
Classifier: Programming Language :: Python :: 3
Classifier: Operating System :: OS Independent
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: pyyaml==6.0.3
Dynamic: license-file

# Kaizo

YML file config reader and runner
---
The parser in `utils/parser.py` makes experiments highly flexible. Each YAML file may contain:

- **Direct values**: simple scalars (e.g., `epochs: 10`)
- **Resolvable values**: dictionaries specifying `module`, `source`, `call`, `args`, and optional `lazy`
- **References**: re-use values defined earlier in the config (`args.variable_name`)
- **Local modules**: custom Python files specified by `local` to extend functionality

This design lets you declaratively define entire experiments.

### Example Config

Below is the example config file:

```yaml
ddpm:
  module: trainer.models.ddpm
  source: DDPMTrainer
  args:
    prefix: notebooks
    model_type: sde
    img_size: 32
    in_channels: 1
    batch_size: 64
    shuffle: True
    save_freq: 50
    dataset_path: ./notebooks/data
    beta_min: 0.1
    beta_max: 1
    target_transform:
    download: True
    loader:
      module: loaders
      source: MNISTLoader
      call: False
```

This config demonstrates:

- Loading **MNIST** with `MNISTLoader`
- Using an **SDE-based diffusion trainer**
- Training with `batch_size=64` and saving checkpoints every 50 steps
- Building a UNet-like model with `in_channels=1` and `img_size=32`
