Skip to main content

gatle-ignite

License: BSD-3-Clause Python Code style: Ruff Docs

A config-driven pytorch-ignite training framework.

You write your custom functions: a config, a model, a dataset, a prep_batch. The framework owns the rest: engines, metrics, checkpointing, resume, logging, mixed precision, and distributed training.

Why this exists

gatle-ignite grew out of my own work over the years, from Kaggle competitions to my PhD research and the research that followed. I like working with pytorch-ignite and built my experiments on it, and they all shared the same template on top of it: the same trainer, config layout, checkpointing and logging, which I copied into each new project and then adapted. This package gathers that template into one place, to streamline that work and make future projects easier to start: a new one begins with gatle-ignite init rather than another round of copying.

It is shaped the way I already wrote my experiments: a config file, a model, a dataset and a prep_batch, with each piece named by a plain dotted path and kept in its own folder.

gatle-ignite is an independent project, not affiliated with or endorsed by the PyTorch-Ignite team.

The one rule

A config module is the single source of truth, and every component is selected by a dotted module path that gets imported at runtime. There is no registry and no decorator: you write a module that exposes a fixed entrypoint name, and you point a config at it.

cfg.model_name     = "models.mlp"                       # a module exposing Model(**model_params)
cfg.criterion_name = "gatle_ignite.losses.composite"
cfg.optimizer_name = "gatle_ignite.optimizers.adamw"    # builtins are just modules too

Builtins have no special status: they are named in full, exactly like yours. (The one exception is cfg.logger_name, a list of enabled sinks, which takes short names like "text".)

The whole task-specific trainer

from gatle_ignite import BaseTrainer, to_device

class Trainer(BaseTrainer):
    def prep_batch(self, batch, split="train", **kwargs):
        x, y = batch
        return to_device({"model_input": {"x": x}, "targets": {"labels": y}})

That is not an excerpt.

Install

pip install gatle-ignite

Requires Python ≥3.9, torch ≥2.4, pytorch-ignite ≥0.4.13 (0.4 and 0.5 both work). Extras are in the install guide.

Start a project

gatle-ignite init my_project && cd my_project
gatle-ignite train --config=configs/my_project_v0.py   # trains as-is, on synthetic data

One directory per concern (configs/, dataloaders/, losses/, metrics/, models/, trainer/), and a concern you do not have is a directory you do not create. The generated README says where a loss, a metric or a sampler goes, and which builtins mean you need not write one.

Or read the examples

git clone https://github.com/ryanwongsa/gatle-ignite.git && cd gatle-ignite
pip install -e ".[dev]"
gatle-ignite train --config=examples/synthetic/configs/synthetic_v0.py   # CPU, seconds, nothing to download

Nine worked tasks, each the same shape as what init writes: a GAN's two optimizers, a diffusion sampler at eval, seq2seq, distillation with a second model, EMA, contrastive.

Documentation

License

BSD-3-Clause. See LICENSE.

Metadata

Release files for gatle-ignite 0.4.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for gatle-ignite 0.4.1
File Size Uploaded
gatle_ignite-0.4.1.tar.gz 196.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for gatle-ignite 0.4.1
File Interpreter ABI Platform
gatle_ignite-0.4.1-py3-none-any.whl Python 3 none any Details

Total release size: 259.8 kB

Release files / gatle_ignite-0.4.1.tar.gz

Download URL gatle_ignite-0.4.1.tar.gz
Size 196.2 kB
Tags Source
SHA-256 checksum
How to use checksums
06496f02118f01d3a88913cf872b40ecaed13ba82793772bdcd6d5fc80863bb8
BLAKE2b-256 checksum
How to use checksums
d818142f2437c5f750e157be4b857a01ffca3e4ca42fd133d67d3fddf334e6a5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 30, 2026.

Transparency log

Release files / gatle_ignite-0.4.1-py3-none-any.whl

Download URL gatle_ignite-0.4.1-py3-none-any.whl
Size 63.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
170d0cba16f32d41b7e27e4a6c9d0233ac009817f7ff9e15ab8719668f6bcbf5
BLAKE2b-256 checksum
How to use checksums
d65b2e0e2b6b65f3814070ac6f763b1396903f02a66ca7f4ff74a2ddaa6f0b05
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 30, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.4.1 This release

2 release files

0.4.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page