Metadata-Version: 2.4
Name: echelon3
Version: 0.6.0
Summary: Config-driven PyTorch training framework: assemble nets, data, losses and trainers from YAML
Project-URL: Homepage, https://github.com/veryviolet/echelon3
Project-URL: Repository, https://github.com/veryviolet/echelon3
Project-URL: Issues, https://github.com/veryviolet/echelon3/issues
Project-URL: Documentation, https://veryviolet.github.io/echelon3/
Author-email: Kirill Groshenkov <kir.groshenkov@gmail.com>
License-Expression: Apache-2.0
License-File: LICENSE
Keywords: computer-vision,config-driven,deep-learning,hydra,pytorch,training
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Topic :: Software Development :: Libraries
Requires-Python: >=3.10
Requires-Dist: albumentations>=1.4
Requires-Dist: colorama>=0.4
Requires-Dist: hydra-core>=1.3
Requires-Dist: numpy>=1.24
Requires-Dist: omegaconf>=2.3
Requires-Dist: opencv-python>=4.8
Requires-Dist: pandas>=2.0
Requires-Dist: scikit-learn>=1.3
Requires-Dist: scipy>=1.10
Requires-Dist: tensorboard>=2.14
Requires-Dist: timm>=1.0
Requires-Dist: torch>=2.1
Requires-Dist: torchmetrics>=1.2
Requires-Dist: torchvision>=0.16
Requires-Dist: tqdm>=4.65
Provides-Extra: detection
Requires-Dist: faster-coco-eval>=1.5; extra == 'detection'
Provides-Extra: docs
Requires-Dist: mkdocs-material<10,>=9.7; extra == 'docs'
Requires-Dist: mkdocs<2,>=1.6.1; extra == 'docs'
Provides-Extra: export
Requires-Dist: onnx>=1.15; extra == 'export'
Requires-Dist: onnxruntime>=1.16; extra == 'export'
Provides-Extra: sam
Requires-Dist: mosaicml>=0.3.1; extra == 'sam'
Provides-Extra: smp
Requires-Dist: segmentation-models-pytorch>=0.3.3; extra == 'smp'
Description-Content-Type: text/markdown

# echelon3

Config-driven PyTorch training framework. Every component of a training run —
network, dataset, augmentations, losses, metrics, optimizer, scheduler, trainer,
export — is described in a YAML config as a `module` / `type` / `config` triple
and instantiated dynamically:

```yaml
net:
  module: echelon3.nets.classifier   # import path (or a path to a .py file)
  type: ClassifierNet                # class or factory function in that module
  config: { ... }                    # constructor kwargs
```

There is no component registry: anything importable can be plugged in — classes
from `echelon3`, from `torch`/`timm`/`torchmetrics`/`albumentations`, or from
your own project code living next to your configs.

**Documentation: <https://veryviolet.github.io/echelon3/>**

## Install

```
pip install echelon3
```

## Train

```
echelon3-train --config-dir ./configs --config-name my_experiment
```

CLIs: `echelon3-train`, `echelon3-finetune` (warm-start / freeze / head-only),
`echelon3-evaluate`, `echelon3-run` (inference), `echelon3-export` (ONNX).

## Multi-GPU — built in, no `torchrun`

Name the GPUs and echelon3 spawns one DDP worker per GPU itself:

```
echelon3-train --config-dir ./configs --config-name my_experiment gpus=[0,1,2,3]
```

`gpus` is a root config key — leave it out and echelon3 uses every visible GPU on
the node. `dataloaders.train.config.batch_size` is the **global** batch size; it
is split across ranks automatically. `torchrun` (and SLURM `srun`) still work
unchanged for multi-node / elastic jobs.

> DataParallel was removed in 0.5.0 — multiple GPUs always run as DDP.

## Mixed precision

Training, evaluation and inference use **bf16 automatic mixed precision by
default** on capable GPUs (fp32 on CPU / unsupported GPUs) — a large speedup on
modern hardware. Force full fp32 with `precision: fp32` under `trainer.config`
(or `precision: fp32` at the config root for `evaluate` / `run`).

## Quick start

`examples/` has self-contained smoke runs — a classifier, a CenterNet-style
detector and semantic segmentation — each with a synthetic-data generator and a
minimal config that trains, validates and checkpoints on CPU or GPU.
