omegakit
omegakit is a small library on top of OmegaConf for experiment configs. Every
experiment is a YAML file in git that names its base and its includes by path. You
load it from your own main() and build your objects from it, checked before
anything is called. The same file and seed give the same run. Install it with
pip install omegakit, on Python 3.10 or newer.
# base.yaml
$target: experiment.Experiment
seed: 0
epochs: 100
loss:
$symbol: torch.nn.functional.mse_loss
optimizer:
$target: torch.optim.SGD
$partial: true
lr: 0.1
# linear.yaml
$base: ~include base.yaml
model:
$target: torch.nn.Linear
in_features: 16
out_features: 1
# experiment.py
from collections.abc import Callable
from dataclasses import dataclass
import torch
@dataclass
class Experiment:
seed: int
epochs: int
loss: Callable[..., torch.Tensor]
model: torch.nn.Module
optimizer: Callable[..., torch.optim.Optimizer]
# main.py
import torch
from experiment import Experiment
from omegakit import instantiate, load_config
config = load_config("linear.yaml")
torch.manual_seed(config.seed)
experiment = instantiate(config, Experiment)
model = experiment.model
optimizer = experiment.optimizer(model.parameters())
x, y = torch.randn(64, 16), torch.randn(64, 1)
for _ in range(experiment.epochs):
optimizer.zero_grad()
experiment.loss(model(x), y).backward()
optimizer.step()
linear.yaml took the seed, the epochs, the loss and the optimizer from
base.yaml, and added a model. $target names a class or function to call, here
Experiment at the root, $symbol passes a function as it is, and $partial
builds the optimizer later, once the model's parameters exist. instantiate checks
the config against the fields of Experiment before anything is built:
epochs: many raises an error that names the key. The
documentation trains a small PyTorch model in
every example.
What you can do
- One file per experiment, sharing a base: Getting started
- Run one experiment for many values: Parameter sweeps
- Check configs before anything runs: Validation
omegakit does not launch jobs, parse your command line or record your runs. See how it compares with Hydra and other experiment tools.
Trust
Configs import and call Python code: loading one runs its resolvers, and
validating, checking and building one import the modules it names. Load configs
only from trusted sources, and wrap secrets in ${secret:...}. The
Trust model page lists what
runs.
omegakit requires OmegaConf 2.4. It builds on OmegaConf but is not affiliated with or endorsed by the OmegaConf project. Contributing.
Metadata
Release files for omegakit 0.12.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| omegakit-0.12.0.tar.gz | 33.3 kB | With provenance | Details for omegakit-0.12.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| omegakit-0.12.0-py3-none-any.whl | Python 3 | none | any | Details for omegakit-0.12.0-py3-none-any.whl |
Total release size: 84.5 kB
Release files / omegakit-0.12.0.tar.gz
| Download URL | omegakit-0.12.0.tar.gz |
|---|---|
| Size | 33.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
320e2d071790406feb7823c2d340afa30f7d1f6431dda58ac4b7591768288ebc
|
|
BLAKE2b-256 checksum How to use checksums |
238734f7fe4a5f8d193196d789b3d3cae99d7b6bd67d49877e6bbd8018e22218
|
| 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 Oct 21, 2026.
Transparency logRelease files / omegakit-0.12.0-py3-none-any.whl
| Download URL | omegakit-0.12.0-py3-none-any.whl |
|---|---|
| Size | 51.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1c5e26574524c43421173dfc4d1f607503bcf2e27909a8012f4496055084095d
|
|
BLAKE2b-256 checksum How to use checksums |
6e6c258b2ff574043f2546325567757f3d9b2871d3d90d5631d9e650e67f3b16
|
| 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 Oct 21, 2026.
Transparency logSecurity for omegakit 0.12.0
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.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for omegakit-0.12.0.tar.gz
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 Oct 21, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.