YAML Config Manager
A robust, "LLM-friendly" Python library for managing Deep Learning configurations. It seamlessly combines YAML files with command-line overrides, supporting dotted notation, scientific notation, and flexible argument styles.
Features
- YAML + CLI: Load defaults from YAML, override via CLI.
- Dotted Access:
config.model.layer_countinstead ofconfig['model']['layer_count']. - Robust Parsing:
- Supports scientific notation (
1e-4is a float, not string). - Smart boolean parsing (
yes,on,true->True).
- Supports scientific notation (
- Flexible CLI: Supports both
--param=valueand--param value. - Safety: Raises
AttributeErrorfor missing keys (no silent failures).
Installation
pip install .
Quick Start
1. Create config.yaml
training:
lr: 1e-4
batch_size: 32
model:
type: transformer
layers: 12
2. Use in Python
from yaml_config_manager import load_config
# Automatically parses sys.argv
config = load_config()
print(f"Model: {config.model.type}")
print(f"LR: {config.training.lr} (type: {type(config.training.lr)})")
3. Run with Overrides
Mixed styles supported:
python train.py --config config.yaml --training.lr 2e-5 --model.layers=24 --debug_mode
Advanced Usage
- Manual Args:
load_config(args=['--param', 'val']) - Default Path:
load_config(config_path='default.yaml') - Missing Keys: Accessing
config.missingraisesAttributeErrorto catch typos early.
Metadata
Release files for yaml-config-manager 0.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| yaml_config_manager-0.2.1.tar.gz | 6.5 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| yaml_config_manager-0.2.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 12.6 kB
Release files / yaml_config_manager-0.2.1.tar.gz
| Download URL | yaml_config_manager-0.2.1.tar.gz |
|---|---|
| Size | 6.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
839d9ce42ab8912b8a3afcbd3e138dbf20e2f7977d464b249e0fd695903644a4
|
|
BLAKE2b-256 checksum How to use checksums |
91be61fbfd8fcefa91b4c07e22ecf1ecfda557a7c09b40e608cdcdce13a094e4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.11
|
Release files / yaml_config_manager-0.2.1-py3-none-any.whl
| Download URL | yaml_config_manager-0.2.1-py3-none-any.whl |
|---|---|
| Size | 6.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
02bff06c2ebe755316dfc21552d9c9bd48e1e3e194d0ea4eecf74ab440a04be5
|
|
BLAKE2b-256 checksum How to use checksums |
97ed0b340f814f8359c106fa968059462416ed4eb0f016889f5bc66b4abf78a5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.11
|
Security for yaml-config-manager 0.2.1
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
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.