Repository navigation
260 Update QualityControlPipeline to consume the QualityMetric.compute() dictionary-based API - #261
Open
jeipollack wants to merge 3 commits into
Open
jeipollack wants to merge 3 commits into
jeipollack wants to merge 3 commits into
Conversation
added 3 commits
September 30, 2026 18:54
- Add diagnostic attribute to RejectionPolicyConfig - Update rejection config section parser - Remove validation methods added to pipeline.py - Update config_test.py with new and improved test cases - Update fixtures and remove deprecated YAML fixtures
- Add validation for metric resource requirements and rejection policy configuration - Call configuration validation from the pipeline constructor - Update pipeline execution to consume the `QualityMetric.compute` diagnostics API - Apply rejection policies using their configured diagnostic - Move cross-section validation tests from config_test.py to pipeline_test.py - Update and extend pipeline test coverage for the revised validation and updated processing flow
This branch has not been deployed
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
This PR updates the pipeline and configuration handling to support the dictionary-based metric API, allowing a rejection policy to select a specific diagnostic produced by a quality metric.
Context: There was an incompatibility between the
QualityMetric.compute()API introduced in PR #258 and the quality-control pipeline, which previously assumed that a metric returned a single array rather than multiple diagnostics in a dictionary.closes #260
Several files were modified in this PR to resolve the bug, but all are within the scope of the changes. I recommend taking a look at the referenced issue and the Notes section at the bottom, where I tried to provide some additional context on the changes and where to start the review. If you have questions about the processing flow, I'm happy to set up a meeting to go through it together.
What’s changed
QualityControlPipelineto consume theQualityMetric.compute()dictionary-based API.QualityMetric.diagnosticsclass attribute.diagnosticfield toRejectionPolicyConfigto select which metric diagnostic is used by a rejection policy.config_test.pytopipeline_test.py.How to test / verify
config_test.py, particularly parsing and validation of rejection-policy configuration.pipeline_test.pyfor configuration validation and the updated metric → diagnostic → rejection-policy processing flow.Scope
This PR is part of the quality-control/outlier-rejection work.
Changelog
The changes are internal and do not introduce a user-visible change to the public product behaviour.
Reviewer Checklist
develop, ormainfor release PRs)ruff)Next Steps / Notes (if applicable)
The recommended review path is to start with
quality_control/pipeline.pyto understand the end-to-end processing flow, then trace the corresponding changes intoconfig.py,metrics/base.py, the concrete metrics, and the tests.The main processing flow is:
configuration → pipeline → resource resolution → metric computation → diagnostics → rejection policy → validity masks → QualityControlResultThe associated issue contains the more detailed architectural discussion and validation results.