Summary
Extend the Quality Control configuration framework to support declaring resources available to the QC pipeline and specifying the resources required by individual quality metrics.
The configuration should provide a generic mechanism for describing resources without coupling the configuration layer to specific resource types such as PSF models.
This configuration will provide the basis for the QualityControlPipeline resource-resolution and execution-context architecture defined in #240.
Proposed configuration
resources:
psf_models:
standard:
inference_config: inference_standard.yaml
metrics:
mask_obscuration:
enabled: true
params:
aperture: gaussian
sigma: 2.5
goodness_of_fit:
enabled: true
required_resources:
- psf_models.standard
params:
statistic: reduced_chi_square
normalize_residuals: true
rejection:
mask_obscuration:
enabled: true
threshold: 0.25
goodness_of_fit:
enabled: false
threshold: 3.0
reporting:
save_metrics: true
log_statistics: true
The resources section is intentionally generic so that future resource types can be introduced without modifying the configuration framework.
What’s changed
- Add a
ResourcesConfig configuration object for resources available to the QC pipeline.
- Add
required_resources to QualityMetricConfig.
- Preserve
params for metric-specific configuration.
- Parse the new
resources section.
- Parse metric
required_resources declarations.
- Validate that required resource identifiers follow the expected
<resource_type>.<resource_name> form.
- Validate that required resources are available in the configuration.
- Validate that enabled rejection policies reference configured and enabled quality metrics.
- Run cross-section configuration validation when loading the QC configuration.
- Update configuration examples and unit tests accordingly.
- Add a changelog fragment under Internal changes.
Validation
The configuration layer should reject, with clear errors:
- malformed resource identifiers;
- unknown resource types;
- unknown resource names;
- enabled rejection policies referring to unknown metrics;
- enabled rejection policies referring to disabled metrics.
Validation should occur during QualityControlConfigHandler.load(), so callers receive either a valid QualityControlConfig or an exception.
Relationship to #240
This issue provides the configuration plumbing required by the QC pipeline orchestration implemented in #240.
The pipeline will use required_resources to determine which execution resources need to be prepared before metric evaluation and will subsequently make those resources available through the QC execution context.
Resource generation and metric execution are not part of this issue.
Scope / Non-goals
This issue does not implement:
- PSF inference or other resource generation;
QualityControlContext;
- resource deduplication or caching;
- quality metric computation;
- rejection policy execution;
- shape metrics;
- pipeline execution orchestration.
Those responsibilities remain part of the QC pipeline implementation and subsequent metric-specific work.
Acceptance criteria
Summary
Extend the Quality Control configuration framework to support declaring resources available to the QC pipeline and specifying the resources required by individual quality metrics.
The configuration should provide a generic mechanism for describing resources without coupling the configuration layer to specific resource types such as PSF models.
This configuration will provide the basis for the
QualityControlPipelineresource-resolution and execution-context architecture defined in #240.Proposed configuration
The
resourcessection is intentionally generic so that future resource types can be introduced without modifying the configuration framework.What’s changed
ResourcesConfigconfiguration object for resources available to the QC pipeline.required_resourcestoQualityMetricConfig.paramsfor metric-specific configuration.resourcessection.required_resourcesdeclarations.<resource_type>.<resource_name>form.Validation
The configuration layer should reject, with clear errors:
Validation should occur during
QualityControlConfigHandler.load(), so callers receive either a validQualityControlConfigor an exception.Relationship to #240
This issue provides the configuration plumbing required by the QC pipeline orchestration implemented in #240.
The pipeline will use
required_resourcesto determine which execution resources need to be prepared before metric evaluation and will subsequently make those resources available through the QC execution context.Resource generation and metric execution are not part of this issue.
Scope / Non-goals
This issue does not implement:
QualityControlContext;Those responsibilities remain part of the QC pipeline implementation and subsequent metric-specific work.
Acceptance criteria
ResourcesConfigrepresents configured resources.QualityMetricConfigsupportsrequired_resources.ValueErrors.ValueErrors.