Registry / devops / prefigure

prefigure

JSON →
library0.0.10pypypi✓ verified 85d ago

Run configuration management utilities combining configparser, argparse, and wandb.API. Version 0.0.10 is the latest; release cadence is sporadic.

pip install prefigure
INSTALL
IMPORT
SIG · PREFIGURE
P
prefigure
devopspythonv0.0.10
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

BareParser
from prefigure import BareParser
from prefigure import Config

Create a Config object with defaults, then parse arguments.

from prefigure import Config import os # Define configuration cfg = Config( defaults={ 'learning_rate': 1e-3, 'batch_size': 32, }, wandb_api_key=os.environ.get('WANDB_API_KEY', '') ) # Parse command line arguments cfg.parse() print(cfg.learning_rate)
Debug
Known issues
gotchaThe 'parse' method may overwrite defaults with command-line args; be careful about order of operations.
fix
Call cfg.parse() after setting defaults explicitly.
affects: all
gotchaIf wandb is not installed, the wandb integration fails silently; no error is raised.
fix
Install wandb if you need logging: pip install wandb
affects: all
deprecatedThe 'wandb_api_key' parameter is deprecated in favor of environment variable WANDB_API_KEY.
fix
Set WANDB_API_KEY env var instead of passing it to Config.
affects: 0.0.10
Upgrade
Version history
0.0.10latest on PyPI · released Jun 28, 2023
Audit
Dependencies
wandboptionalOptional integration for Weights & Biases logging
Agent activity
7 hits · last 30 days
node
6
Resources
prefigure — pip install prefigure · libregistry