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

inspect_job.py crashes on empty Job

    Details

    • Type: Bug
    • Status: To Do
    • Resolution: Unresolved
    • Fix Version/s: None
    • Component/s: verify
    • Labels:
      None
    • Templates:
    • Story Points:
      2
    • Team:
      Alert Production

      Description

      Running inspect_job.py on a Job file that doesn't contain any metric values gives the following error:

      Traceback (most recent call last):
        File "/scratch/krzys001/verify/bin/inspect_job.py", line 28, in <module>
          main()
        File "/scratch/krzys001/verify/python/lsst/verify/bin/inspectjob.py", line 143, in main
          inspect_job(job)
        File "/scratch/krzys001/verify/python/lsst/verify/bin/inspectjob.py", line 91, in inspect_job
          max_metric_length = max([len(str(metric)) for metric in job.measurements])
      ValueError: max() arg is an empty sequence
      

      Reorganize the code so that max_metric_length is not calculated in this case. It may be helpful to distinguish the case where there are no metric values but there are Job-level metadata from the case where neither is present.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                krzys Krzysztof Findeisen
                Reporter:
                krzys Krzysztof Findeisen
                Watchers:
                Krzysztof Findeisen
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:

                  Summary Panel