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 imports by path. You load it from your own main(), check it against a dataclass, and build your objects from it. The same file and seed give the same run. Install it with pip install omegakit, on Python 3.12 or newer.

# base.yaml
seed: 0
epochs: 100
loss:
  $ref: torch.nn.functional.mse_loss
optimizer:
  $class: torch.optim.SGD
  $partial: true
  lr: 0.1
# linear.yaml
$base: ~import base.yaml
model:
  $class: torch.nn.Linear
  in_features: 16
  out_features: 1
from collections.abc import Callable
from dataclasses import dataclass

import torch
from omegakit import instantiate, load_config


@dataclass
class Experiment:
    seed: int
    epochs: int
    loss: Callable[..., torch.Tensor]
    model: torch.nn.Module
    optimizer: Callable[..., torch.optim.Optimizer]


config = load_config("linear.yaml")
torch.manual_seed(config.seed)
experiment = instantiate(config, schema=Experiment)
optimizer = experiment.optimizer(experiment.model.parameters())

linear.yaml took the seed, the epochs, the loss and the optimizer from base.yaml, and added a model. $class names a class to build, $ref passes a function as it is, and $partial builds the optimizer later, once the model's parameters exist. The dataclass checks the config 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 read secrets with ${secret:NAME}. The Trust model page lists what runs.

omegakit supports OmegaConf 2.3 and 2.4. It builds on OmegaConf but is not affiliated with or endorsed by the OmegaConf project. Contributing.

Metadata

Release files for omegakit 0.8.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.8.0
File Size Uploaded Provenance Actions
omegakit-0.8.0.tar.gz 29.5 kB With provenance Details for omegakit-0.8.0.tar.gz

Built distribution (wheel)

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

Total release size: 67.1 kB

Release files / omegakit-0.8.0.tar.gz

Download URL omegakit-0.8.0.tar.gz
Size 29.5 kB
Tags Source
SHA-256 checksum
How to use checksums
cdb2198b9e2eca62bd2b0752446271c109da0b173c25d904fb8b37aab5008f23
BLAKE2b-256 checksum
How to use checksums
cdad5ff31fe073004f0a9c8d211f9c5b05310462cc364d1c532df25249b5ab8a
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 28, 2026.

Transparency log

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

Download URL omegakit-0.8.0-py3-none-any.whl
Size 37.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6043879330db82b9ebcb235298ef00a29bf0d09a8155c7974b0c6c7c97c52efb
BLAKE2b-256 checksum
How to use checksums
09693526ae6818c5e6bf7ebc27ae39da181011c5e9630bf4d6e9484562575528
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 28, 2026.

Transparency log

Security for omegakit 0.8.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.8.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 Sep 28, 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