Uploaded image for project: 'Data Management'
  1. Data Management
  2. DM-18429

Metric tags in lsst.verify throws error

    Details

    • Type: Bug
    • Status: To Do
    • Resolution: Unresolved
    • Fix Version/s: None
    • Component/s: verify
    • Labels:
      None
    • Templates:
    • Team:
      SQuaRE

      Description

      While developing a tutorial notebook on the lsst.verify package, I noticed that when creating the verification report, it is possible to select of spec_tags, but the metric_tags selection throws an error. Here is an example:

      job.metrics['demo_astrometry.AstrometricRMS'].tags
      

      {'astrometry', 'demo'}

      job.report(metric_tags=['astrometry']).show()
      

      ---------------------------------------------------------------------------
      KeyError Traceback (most recent call last)
      <ipython-input-23-cf5e02f322d3> in <module>
      ----> 1 job.report(metric_tags=['astrometry']).show()

      /opt/lsst/software/stack/stack/miniconda3-4.5.4-fcd27eb/Linux64/verify/17.0/python/lsst/verify/job.py in report(self, name, spec_tags, metric_tags)
      387 report = self.specs.report(self.measurements, meta=self.meta,
      388 name=name, metric_tags=metric_tags,
      --> 389 spec_tags=spec_tags, metrics=self.metrics)
      390 return report

      /opt/lsst/software/stack/stack/miniconda3-4.5.4-fcd27eb/Linux64/verify/17.0/python/lsst/verify/specset.py in report(self, measurements, name, meta, spec_tags, metric_tags, metrics)
      951 spec_subset = self.subset(name=name, meta=meta,
      952 spec_tags=spec_tags,
      --> 953 metric_tags=metric_tags, metrics=metrics)
      954 return Report(measurements, spec_subset)
      955

      /opt/lsst/software/stack/stack/miniconda3-4.5.4-fcd27eb/Linux64/verify/17.0/python/lsst/verify/specset.py in subset(self, name, meta, required_meta, spec_tags, metric_tags, metrics)
      902 if metric_tags is not None:
      903 metric_tags = set(metric_tags)
      --> 904 specs = [spec for spec_name, spec in spec_subset.items()
      905 if metric_tags <= metrics[spec.metric_name].tags]
      906

      /opt/lsst/software/stack/stack/miniconda3-4.5.4-fcd27eb/Linux64/verify/17.0/python/lsst/verify/specset.py in <listcomp>(.0)
      903 metric_tags = set(metric_tags)
      904 specs = [spec for spec_name, spec in spec_subset.items()
      --> 905 if metric_tags <= metrics[spec.metric_name].tags]
      906
      907 return spec_subset

      /opt/lsst/software/stack/stack/miniconda3-4.5.4-fcd27eb/Linux64/verify/17.0/python/lsst/verify/metricset.py in _getitem_(self, key)
      205 if not isinstance(key, Name):
      206 key = Name(metric=key)
      --> 207 return self._metrics[key]
      208
      209 def _setitem_(self, key, value):

      KeyError: Name('jointcal', 'astrometry_chisq')

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              kbechtol Keith Bechtol
              Watchers:
              Jonathan Sick, Keith Bechtol, Simon Krughoff
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:

                Summary Panel