Skip to main content

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.12 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

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.10.0

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

Source distribution (sdist)

Source distribution for omegakit 0.10.0
File Size Uploaded Provenance Actions
omegakit-0.10.0.tar.gz 27.7 kB With provenance Details for omegakit-0.10.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for omegakit 0.10.0
File Interpreter ABI Platform Actions
omegakit-0.10.0-py3-none-any.whl Python 3 none any Details for omegakit-0.10.0-py3-none-any.whl

Total release size: 72.5 kB

Release files / omegakit-0.10.0.tar.gz

Download URL omegakit-0.10.0.tar.gz
Size 27.7 kB
Tags Source
SHA-256 checksum
How to use checksums
eac4e7ddb068db85d33c250fb3eec22c8268587796360b9e0fac76420101fa3c
BLAKE2b-256 checksum
How to use checksums
3925d8900b8c5fd0dde93aece642846542c1314669a0b2a7ee3456937a86e0ab
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 15, 2026.

Transparency log

Release files / omegakit-0.10.0-py3-none-any.whl

Download URL omegakit-0.10.0-py3-none-any.whl
Size 44.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c900f7df9c519039d7c93c1cfa93a72819d01ee9544c0194b9cb34106d248d37
BLAKE2b-256 checksum
How to use checksums
7a17e2877d3a2277471cb4d4dcdd057d8def02657837dcf8137b4fb4f1d989de
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 15, 2026.

Transparency log

Security for omegakit 0.10.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.

Select from 2 files

Attestation for omegakit-0.10.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 15, 2026.

Transparency log

A 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.

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