Skip to main content

Config-driven PyTorch training framework: assemble nets, data, losses and trainers from YAML

Project description

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:

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

echelon3-0.5.2.tar.gz (116.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

echelon3-0.5.2-py3-none-any.whl (123.0 kB view details)

Uploaded Python 3

File details

Details for the file echelon3-0.5.2.tar.gz.

File metadata

  • Download URL: echelon3-0.5.2.tar.gz
  • Upload date:
  • Size: 116.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for echelon3-0.5.2.tar.gz
Algorithm Hash digest
SHA256 ed37cc523bf4e1881b75e581ffdd2a472eaf088b5718014046e39fd51c2c9f8f
MD5 d9e9db54b7b4fe550908f4775d7dd251
BLAKE2b-256 75b92aed8741785c666a76a6ceba59cdce8c005fa06b7faeb44e1cc637cc240e

See more details on using hashes here.

Provenance

The following attestation bundles were made for echelon3-0.5.2.tar.gz:

Publisher: publish.yml on veryviolet/echelon3

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file echelon3-0.5.2-py3-none-any.whl.

File metadata

  • Download URL: echelon3-0.5.2-py3-none-any.whl
  • Upload date:
  • Size: 123.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for echelon3-0.5.2-py3-none-any.whl
Algorithm Hash digest
SHA256 117ff23bc01313cd99b91a1340a6220e50f445f997ab916f5caa05756c720a1c
MD5 de89b4ebd7908f353d28e125eb1a9d78
BLAKE2b-256 4721b245b7ef8607a6ffab12898a2dbdbd3b31d06fe1fb6a4bb518f7a1b5d2c3

See more details on using hashes here.

Provenance

The following attestation bundles were made for echelon3-0.5.2-py3-none-any.whl:

Publisher: publish.yml on veryviolet/echelon3

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page