Skip to main content

Configuration management package for Kaggle projects using OmegaConf

Project description

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

kef-0.1.2.tar.gz (6.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

kef-0.1.2-py3-none-any.whl (7.8 kB view details)

Uploaded Python 3

File details

Details for the file kef-0.1.2.tar.gz.

File metadata

  • Download URL: kef-0.1.2.tar.gz
  • Upload date:
  • Size: 6.4 kB
  • Tags: Source
  • Uploaded using 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}

File hashes

Hashes for kef-0.1.2.tar.gz
Algorithm Hash digest
SHA256 a7b19fa3245887375799b4a079815874faddd33ac9aa4482579dff584ed29660
MD5 3bef2996381d9a34ebffb8f17ed5bd84
BLAKE2b-256 ffc4b6c1e06de034562c97769fe80b6bf87c7f258f5e4f57fae97d325d4abc0c

See more details on using hashes here.

File details

Details for the file kef-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: kef-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 7.8 kB
  • Tags: Python 3
  • Uploaded using 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}

File hashes

Hashes for kef-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 e3a7dca0afb40c503909d4b9580dbe80b07722287348a5cd409689e62fa8b406
MD5 5d09cbe6e2772623e6dab9acc496abe1
BLAKE2b-256 20e3196e57576027eafc28d7baa7557a8835766f72920bb2986a0ad67ec42901

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page