Skip to main content

kef

Hierarchical configuration management for Kaggle projects using OmegaConf.

Overview

kef provides a unified interface for merging repository-wide base configurations with project-specific overrides. It is designed for monorepos or projects where multiple experiments share global infrastructure settings but require local hyperparameter variations.

Installation

uv add kef

Configuration Hierarchy

kef automatically discovers and merges configurations in the following priority (lowest to highest):

  1. Base Configuration: kef.yaml or kef.toml located at the git repository root.
  2. Project Configuration: kef.yaml or kef.toml found in the current directory or its parent hierarchy.

Project-level configurations override base configurations.

API Usage

Access the merged configuration singleton:

from kef import cfg

# Access via dot notation
print(cfg.ml.model.max_iter)

# Access via dictionary keys
print(cfg["mlflow"]["tracking_uri"])

# Convert to native dictionary
config_dict = cfg.to_dict()

If you need to reload the configuration (e.g., after changing directories programmatically):

from kef import reload_config
cfg = reload_config()

Command Line Interface

kef includes a CLI for inspecting the configuration applied in the current workspace.

View Configuration

# Render the entire merged configuration with syntax highlighting
kef view

# View a specific section or key
kef view ml.feature_engineering

# View without resolving OmegaConf interpolations
kef view --no-resolve

Discovery Info

Check which files are being used:

kef info

Shell Completion

To enable tab completion for kef commands and options, add the following to your shell profile:

Zsh

eval "$(_KEF_COMPLETE=zsh_source kef)"

Note: Once enabled, kef view supports dynamic tab-completion for your configuration keys (including dot notation).

Bash

eval "$(_KEF_COMPLETE=bash_source kef)"

Fish

_KEF_COMPLETE=fish_source kef | source

Contributing

Contributions are welcome! Please see CONTRIBUTING.md for details on our code of conduct, development workflow, and semantic commit message conventions.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Metadata

Release files for kef 0.1.2

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

Source distribution (sdist)

Source distribution for kef 0.1.2
File Size Uploaded
kef-0.1.2.tar.gz 6.4 kB Details

Built distribution (wheel)

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

Total release size: 14.2 kB

Release files / kef-0.1.2.tar.gz

Download URL kef-0.1.2.tar.gz
Size 6.4 kB
Tags Source
SHA-256 checksum
How to use checksums
a7b19fa3245887375799b4a079815874faddd33ac9aa4482579dff584ed29660
BLAKE2b-256 checksum
How to use checksums
ffc4b6c1e06de034562c97769fe80b6bf87c7f258f5e4f57fae97d325d4abc0c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.18 {"installer":{"name":"uv","version":"0.9.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / kef-0.1.2-py3-none-any.whl

Download URL kef-0.1.2-py3-none-any.whl
Size 7.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e3a7dca0afb40c503909d4b9580dbe80b07722287348a5cd409689e62fa8b406
BLAKE2b-256 checksum
How to use checksums
20e3196e57576027eafc28d7baa7557a8835766f72920bb2986a0ad67ec42901
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.18 {"installer":{"name":"uv","version":"0.9.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release history Release notifications | RSS feed

This release

0.1.2 This release

2 release files

0.1.1

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