A powerful YAML-based configuration system with references, expressions, and dynamic instantiation
Project description
YAML configuration meets Python
Define Python objects in YAML. Reference, compose, and instantiate them effortlessly.
Quick Start
pip install sparkwheel
# config.yaml
dataset:
num_classes: 10
batch_size: 32
model:
_target_: torch.nn.Linear
in_features: 784
out_features: "%dataset::num_classes" # Reference
training:
steps_per_epoch: "$10000 // @dataset::batch_size" # Expression
from sparkwheel import Config
config = Config()
config.update("config.yaml")
model = config.resolve("model") # Actual torch.nn.Linear(784, 10)
Features
- Declarative Objects - Instantiate any Python class with
_target_ - Smart References -
@for resolved values,%for raw YAML - Composition by Default - Dicts merge, lists extend automatically
- Explicit Control -
=to replace,~to delete - Python Expressions - Dynamic values with
$ - Schema Validation - Type-check with dataclasses
Get Started · Documentation · Quick Reference
Community
About
Sparkwheel is a hard fork of MONAI Bundle's config system, with the goal of making a more general-purpose configuration library for Python projects. It combines the best of MONAI Bundle and Hydra/OmegaConf, while introducing new features and improvements not found in either.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file sparkwheel-0.0.11.tar.gz.
File metadata
- Download URL: sparkwheel-0.0.11.tar.gz
- Upload date:
- Size: 50.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.16 {"installer":{"name":"uv","version":"0.9.16","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
84ccedb64e5ecfd0787c1546c65d9778f0e4ea3bae0f0307541e67912f393d95
|
|
| MD5 |
d3cfc296b8dc5a919103ee8d187af4bb
|
|
| BLAKE2b-256 |
1d8baece518d61e756c38b8b75a0eb086ac5869eb6639c8818f381d4bcf9b1f1
|
File details
Details for the file sparkwheel-0.0.11-py3-none-any.whl.
File metadata
- Download URL: sparkwheel-0.0.11-py3-none-any.whl
- Upload date:
- Size: 59.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.16 {"installer":{"name":"uv","version":"0.9.16","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b38bb2ae2b436a06b69ce72641af437341025e8b932fc1499d2715b5ec4ad5ee
|
|
| MD5 |
2f4b345a083954e2463086a8689b2119
|
|
| BLAKE2b-256 |
e157c482271dcbac3309042b2a1c5e0c8a154c53f118ec1e07e35751421a5c65
|