lsst.verify¶
lsst.verify
is a framework for packages that measure software and data quality metrics.
A metric can be any measurable scalar quantity; some examples are in the LSST Science Requirements Document (LPM-17), though packages can also define ad hoc metrics.
Measurements made through lsst.verify
can be uploaded to LSST’s SQUASH monitoring dashboard to help you see how code development affects performance.
Using lsst.verify¶
Contributing¶
lsst.verify
is developed at https://github.com/lsst/verify.
You can find Jira issues for this module under the verify component.
Task reference¶
Pipeline tasks¶
- ApdbMetricTask
A base class for tasks that compute metrics from an alert production database.
- CpuTimingMetricTask
A Task that computes a CPU time using metadata produced by the lsst.utils.timer.timeMethod decorator.
- MemoryMetricTask
A Task that computes the maximum resident set size using metadata produced by the lsst.utils.timer.timeMethod decorator.
- MetadataMetricTask
A base class for tasks that compute metrics from single metadata objects.
- MetricTask
A base class for tasks that compute one metric from input datasets.
- TimingMetricTask
A Task that computes a wall-clock time using metadata produced by the lsst.utils.timer.timeMethod decorator.
Tasks¶
- ConfigApdbLoader
A Task that takes a science task config and returns the corresponding Apdb object.
- DirectApdbLoader
A Task that takes a Apdb config and returns the corresponding Apdb object.
Script reference¶
Python API reference¶
lsst.verify Package¶
Functions¶
|
Output measurements, as |
Classes¶
|
Blob is a flexible container of data, as |
|
A collection of |
|
A value annotated with units, a plot label and description. |
|
Container for |
|
A measurement of a single |
|
Container for annotations (notes) associated with a single |
|
A collection of |
|
Container for verification framework job metadata. |
|
Query of |
|
Container for the definition of a metric. |
|
A collection of |
|
Semantic name of a package, |
|
Specification base class. |
Error resolving a specification document's stated inheritance. |
|
|
A collection of |
|
A threshold-type specification, associated with a |
Base error for verify. |
|
Error accessing or using requirement specifications. |
Class Inheritance Diagram¶
digraph inheritanceb603617720 { bgcolor=transparent; rankdir=LR; size="8.0, 12.0"; "Blob" [URL="../../../py-api/lsst.verify.Blob.html#lsst.verify.Blob",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Blob is a flexible container of data, as `lsst.verify.Datum` \s, that"]; "JsonSerializationMixin" -> "Blob" [arrowsize=0.5,style="setlinewidth(0.5)"]; "BlobSet" [URL="../../../py-api/lsst.verify.BlobSet.html#lsst.verify.BlobSet",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="A collection of `~lsst.verify.Blob`\ s."]; "JsonSerializationMixin" -> "BlobSet" [arrowsize=0.5,style="setlinewidth(0.5)"]; "Datum" [URL="../../../py-api/lsst.verify.Datum.html#lsst.verify.Datum",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="A value annotated with units, a plot label and description."]; "QuantityAttributeMixin" -> "Datum" [arrowsize=0.5,style="setlinewidth(0.5)"]; "JsonSerializationMixin" -> "Datum" [arrowsize=0.5,style="setlinewidth(0.5)"]; "Job" [URL="../../../py-api/lsst.verify.Job.html#lsst.verify.Job",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Container for `~lsst.verify.Measurement`\ s, `~lsst.verify.Blob` \s,"]; "JsonSerializationMixin" -> "Job" [arrowsize=0.5,style="setlinewidth(0.5)"]; "JsonSerializationMixin" [URL="../../../py-api/lsst.verify.jsonmixin.JsonSerializationMixin.html#lsst.verify.jsonmixin.JsonSerializationMixin",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Mixin that provides JSON serialization support to subclasses."]; "Measurement" [URL="../../../py-api/lsst.verify.Measurement.html#lsst.verify.Measurement",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="A measurement of a single `~lsst.verify.Metric`."]; "JsonSerializationMixin" -> "Measurement" [arrowsize=0.5,style="setlinewidth(0.5)"]; "MeasurementNotes" [URL="../../../py-api/lsst.verify.MeasurementNotes.html#lsst.verify.MeasurementNotes",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Container for annotations (notes) associated with a single"]; "MeasurementSet" [URL="../../../py-api/lsst.verify.MeasurementSet.html#lsst.verify.MeasurementSet",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="A collection of `~lsst.verify.Measurement`\ s of"]; "JsonSerializationMixin" -> "MeasurementSet" [arrowsize=0.5,style="setlinewidth(0.5)"]; "Metadata" [URL="../../../py-api/lsst.verify.Metadata.html#lsst.verify.Metadata",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Container for verification framework job metadata."]; "JsonSerializationMixin" -> "Metadata" [arrowsize=0.5,style="setlinewidth(0.5)"]; "MetadataQuery" [URL="../../../py-api/lsst.verify.MetadataQuery.html#lsst.verify.MetadataQuery",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Query of `lsst.verify.Job.meta` metadata."]; "JsonSerializationMixin" -> "MetadataQuery" [arrowsize=0.5,style="setlinewidth(0.5)"]; "Metric" [URL="../../../py-api/lsst.verify.Metric.html#lsst.verify.Metric",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Container for the definition of a metric."]; "JsonSerializationMixin" -> "Metric" [arrowsize=0.5,style="setlinewidth(0.5)"]; "MetricSet" [URL="../../../py-api/lsst.verify.MetricSet.html#lsst.verify.MetricSet",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="A collection of `Metric`\ s."]; "JsonSerializationMixin" -> "MetricSet" [arrowsize=0.5,style="setlinewidth(0.5)"]; "Name" [URL="../../../py-api/lsst.verify.Name.html#lsst.verify.Name",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Semantic name of a package, `~lsst.verify.Metric` or"]; "QuantityAttributeMixin" [fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",tooltip="Mixin with common attributes for classes that wrap an"]; "Specification" [URL="../../../py-api/lsst.verify.Specification.html#lsst.verify.Specification",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Specification base class."]; "JsonSerializationMixin" -> "Specification" [arrowsize=0.5,style="setlinewidth(0.5)"]; "SpecificationResolutionError" [URL="../../../py-api/lsst.verify.SpecificationResolutionError.html#lsst.verify.SpecificationResolutionError",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Error resolving a specification document's stated inheritance."]; "SpecificationSet" [URL="../../../py-api/lsst.verify.SpecificationSet.html#lsst.verify.SpecificationSet",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="A collection of `Specification`\ s."]; "JsonSerializationMixin" -> "SpecificationSet" [arrowsize=0.5,style="setlinewidth(0.5)"]; "ThresholdSpecification" [URL="../../../py-api/lsst.verify.ThresholdSpecification.html#lsst.verify.ThresholdSpecification",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="A threshold-type specification, associated with a `Metric`, that"]; "Specification" -> "ThresholdSpecification" [arrowsize=0.5,style="setlinewidth(0.5)"]; "VerifyError" [URL="../../../py-api/lsst.verify.VerifyError.html#lsst.verify.VerifyError",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Base error for verify."]; "VerifySpecificationError" [URL="../../../py-api/lsst.verify.VerifySpecificationError.html#lsst.verify.VerifySpecificationError",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Error accessing or using requirement specifications."]; "VerifyError" -> "VerifySpecificationError" [arrowsize=0.5,style="setlinewidth(0.5)"]; }lsst.verify.bin.dispatchverify Module¶
Functions¶
|
Entrypoint for the |
|
Insert metadata for lsstsw-based packages into |
|
Insert metadata for extra packages ('--package-repos') into |
|
Insert environment metadata into the Job. |
|
Ensure date_created is a valid datetime string in UTC. |
Classes¶
|
Configuration for dispatch_verify.py that reconciles command line and environment variable arguments. |
Class Inheritance Diagram¶
digraph inheritance50d60cd382 { bgcolor=transparent; rankdir=LR; size="8.0, 12.0"; "Configuration" [URL="../../../py-api/lsst.verify.bin.dispatchverify.Configuration.html#lsst.verify.bin.dispatchverify.Configuration",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Configuration for dispatch_verify.py that reconciles command line and"]; }lsst.verify.extract_metricvalues Module¶
Tools for loading metric values from a butler and printing them, or from two butlers and differencing them.
These functions are used by the print_metricvalues script.
Functions¶
|
Load all measured non-time/non-memory metrics in the given butler repo. |
|
Load all measured timing metrics in the given butler repo. |
|
Load all measured memory usage metrics in the given butler repo. |
|
Print all metrics with measured values in the given repo. |
|
Load metric values from two repos and print their differences. |
|
|
lsst.verify.jsonmixin Module¶
Classes¶
Mixin that provides JSON serialization support to subclasses. |
lsst.verify.metadata.eupsmanifest Module¶
Classes¶
|
Iterator over packages in lsstsw's manifest.txt dataset. |
lsst.verify.metadata.jenkinsci Module¶
Functions¶
Gather metadata entries from LSST DM Jenkins CI environment. |
lsst.verify.metadata.lsstsw Module¶
Classes¶
|
lsstsw package version information based on repos.yaml and checked out Git repositories. |
lsst.verify.squash Module¶
Functions¶
|
GET request to the SQUASH API. |
|
POST a JSON document to SQUASH. |
|
Lookup SQUASH endpoint URL. |
Reset the cache used by |
|
Get the default HTTP client timeout setting. |
|
Get the default SQUASH API versioned used by the lsst.verify.squash client functions. |
|
|
Make the |
lsst.verify.report Module¶
Classes¶
|
Report tabulating specification pass/fail status for a set of |
lsst.verify.tasks Package¶
Classes¶
|
A base class for tasks that compute metrics from metadata values. |
|
A base class for APDB metric task configs. |
|
An abstract connections class defining a database input. |
|
A base class for tasks that compute metrics from an alert production database. |
|
A Task that takes a science task config and returns the corresponding Apdb object. |
alias of |
|
|
A Task that computes a CPU time using metadata produced by the |
|
A Task that takes a Apdb config and returns the corresponding Apdb object. |
alias of |
|
|
A Task that computes the maximum resident set size using metadata produced by the |
|
A base class for metadata metric task configs. |
|
A base class for tasks that compute metrics from single metadata objects. |
This class represents unresolvable errors in computing a metric. |
|
|
|
|
An abstract connections class defining a metric output. |
|
A base class for tasks that compute one metric from input datasets. |
|
An abstract connections class defining a metadata input. |
alias of |
|
|
A Task that computes a wall-clock time using metadata produced by the |