Configuration
Create settings through Configuration. The reference pages list every stored parameter with its type, default, and a short explanation. Use the search box above to find a full path such as config.training.batch_size or a topic such as "learning rate".
from hybrid_sample_generator.configuration import Configuration
config = Configuration("my-study")
config.extraction.anomaly_size = (1, 32, 32)
config.model.set_model("cVAE_ConvNeXt_2D")
config.training.batch_size = 32
config.validate()
Configuration structure
Configuration contains requested behavior only. Generated entities, matching
results and extraction metadata live in the study repository.
config.study identity, location, reproducibility seed
config.extraction cutout, normalization and ROI rules
config.augmentation target-mask and training augmentation
config.generation model sampling, feedback and variant count
config.matching hybrid count, placement count and reuse policies
config.training optimizer and dataloader behavior
config.evaluation metric/outlier settings
config.model generator choice and model-specific parameters
config.fusion fusion backend and backend-specific parameters
The current configuration schema is version 9 and the artifact database schema
is version 2. Older study databases and filename/CSV layouts are intentionally
unsupported; recreate the study and run ingest_dataset() again.
config.study.seed controls reproducibility for training, synthetic variant
generation, and hybrid planning. Set it before running the pipeline:
config.study.seed = 123
Sections
- Study: name, storage location, and seed
- Extraction: crops, ROIs, and normalization
- Augmentation: mask transforms and training offsets
- Generation: sampling, variants, and feedback
- Matching: candidate selection and placement
- Training: optimization and model selection
- Evaluation: foreground and outliers
- Models: model choice, parameters, and Optuna search
- Fusion: backend choice and fusion parameters
Configuration provides defaults, but some settings depend on each other. Run config.validate() after changing the model, image size, or backend. config.schema_version identifies the file format and is set by the code; do not change it manually.
Updating the reference
The pages in configuration/reference/ are generated. When parameters or explanations change, update the configuration classes and scripts/generate_config_reference.py:
python scripts/generate_config_reference.py
python scripts/generate_config_reference.py --check
The check reports new fields without explanations and outdated reference pages. To preview the site locally, install mkdocs-material and run mkdocs serve. GitHub Actions publishes the same Markdown files.