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
DM-16536: Migrate all metrics from ap.verify.measurements #63
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. Is it written down somewhere why the TimingMetricTask remains in lsst.ap.verify
? I didn't quite catch that.
It came up in the RFC-550 discussion. Where would be a good place to document a decision like that? |
Oh I see. I don't entirely understand how that circular dependency comes up. I'll have to take a closer look at how these tasks work. Until I understand the nature of the issue I can't really say if or where it should be documented. |
|
Sorry for being confused, but I thought the hope would be to migrate |
Ah. Yes, that would work from a dependency point of view, but I thought the RFC consensus was that code associated with specific metrics would not go into |
@jonathansick so should I take any action on |
By all means, this is good to go.
So I definitely feel that something like AM1MetricTask, or some other very domain-specific measurement task, ought to belong in the package most associated the metric. But something like timing (if I understand the task's intent well enough) seems so broadly applicable that it could belong in |
@jonathansick Fine. Any preferences on whether |
Given the issue I just ran into with documentation builds, I'll merge as-is and open another ticket for moving |
This commit decouples the MetricsControllerTask invocation from the old-style measurement code, making it possible to request measurements at any granularity.
Since this commit removes all use of the old-style metrics, the corresponding files are deleted as well.
AutoJob is no longer used by any code in ap_verify. Since SQuaSH upload was part of AutoJob, but there is no compelling case to reproduce the feature in the new metrics code, all SQuaSH-related code has been removed. The --silent command-line argument is deprecated.
0a659fa
to
5cf28e7
Compare
This PR replaces all functions previously in
lsst.ap.verify.measurements
withMetricTask
equivalents in other packages (except forTimingMetricTask
, which cannot be reasonably placed in any other Stack package). The hardcoded references insidemeasurements/compute_metrics.py
are replaced withMetricTaskConfig
instances; two default configs for supporting CI are provided inconfig/
.Correctly handling
lsst.ap.association.TotalUnassociatedDiaObjectsMetricTask
required a significant rewrite of the post-ApPipeTask
control flow, which had been written on the assumption that all metrics are calculated after every image. The current solution (hardcoding the existence of twoMetricsControllerTask
s, one for image- and one for dataset-level metrics) is clumsy both for the user and for code maintainers, but I believe it is better to defer generalizing the code to another, more focused ticket.