-
Notifications
You must be signed in to change notification settings - Fork 10
240 architecture implement quality control pipeline orchestration #243
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
roryclaydon1994
merged 10 commits into
develop
from
240-architecture-implement-quality-control-pipeline-orchestration
Aug 27, 2026
Merged
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
0cf7b54
[ARCHITECTURE] Instantiate enabled quality metrics in QC pipeline
e73cf8c
[architecture] add quality control context definition
a2b3c81
Allow flexible dataset typing in quality control context
dd0624f
Add value attribute to ThresholdRejectionPolicy
c02eea3
Update structure of rejection policy section in configuration fixture
c0b7954
Implement minimal quality control pipeline orchestration
e054805
Add logger debug statements for metrics and policies registry classes…
fe41f8e
Add helper _resolve_resources for resource resolution
be88f11
Improve validity masks semantics
0928fd5
Add missing policy section to mask_obscuration section
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| """Quality control context. | ||
|
|
||
| Encapsulates contextual information, such as datasets and resolved resources, | ||
| required by the quality control pipeline and its metrics. | ||
|
|
||
| :Authors: | ||
| Jennifer Pollack <jennifer.pollack@cea.fr> | ||
| """ | ||
|
|
||
| from __future__ import annotations | ||
|
|
||
| from dataclasses import dataclass, field | ||
| from typing import Any | ||
|
|
||
|
|
||
| @dataclass | ||
| class QualityControlContext: | ||
| """Context shared across the quality control pipeline. | ||
|
|
||
| Attributes | ||
| ---------- | ||
| dataset : Any | ||
| Dataset or data container supplied to the quality control pipeline. | ||
|
|
||
| resources : dict[str, Any] | ||
| Ready-to-use resources required by enabled quality metrics, keyed by | ||
| resource identifier. | ||
| """ | ||
|
|
||
| dataset: Any | ||
| resources: dict[str, Any] = field(default_factory=dict) | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -19,4 +19,6 @@ rejection: | |
|
|
||
| mask_obscuration: | ||
| enabled: true | ||
| threshold: 0.25 | ||
| policy: | ||
| threshold: | ||
| value: 0.25 | ||
4 changes: 4 additions & 0 deletions
4
src/wf_psf/tests/test_quality_control/data/valid/imaginary_metric.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| metrics: | ||
|
|
||
| imaginary_metric: | ||
| enabled: true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
42 changes: 42 additions & 0 deletions
42
...sf/tests/test_quality_control/data/valid/quality_control_multiple_rejection_policies.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,42 @@ | ||
| resources: | ||
|
|
||
| psf_models: | ||
| standard: | ||
| inference_config: inference_standard.yaml | ||
| oversampled: | ||
| inference_config: inference_oversampled.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 | ||
| policy: | ||
| threshold: | ||
| value: 3.0 | ||
|
|
||
| goodness_of_fit: | ||
| enabled: true | ||
| policy: | ||
| threshold: | ||
| value: 3.0 | ||
|
|
||
| reporting: | ||
|
|
||
| save_metrics: true | ||
| log_statistics: true |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.