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

Comparing configs after retargeting a subtask throws an exception

    Details

    • Type: Bug
    • Status: Invalid
    • Resolution: Done
    • Fix Version/s: None
    • Component/s: pex_config
    • Labels:
      None
    • Team:
      Data Access and Database

      Description

      If one runs a task, then retargets a subtask and tries to run it again without --clobber-config, the resulting comparison can throw an exception if the two subtasks have differing config schemas. An example traceback is pasted below. This should not be an exception, and should be treated as the comparison returning nonequal.

      imageDifference FATAL: Failed in task initialization: 'GetCoaddAsTemplateConfig' object has no attribute 'doAddCalexpBackground'
      Traceback (most recent call last):
        File "/software/lsstsw/stack/Linux64/pipe_base/13.0-12-gaf0c0ec+1/python/lsst/pipe/base/cmdLineTask.py", line 339, in precall
          self._precallImpl(task, parsedCmd)
        File "/software/lsstsw/stack/Linux64/pipe_base/13.0-12-gaf0c0ec+1/python/lsst/pipe/base/cmdLineTask.py", line 317, in _precallImpl
          task.writeConfig(parsedCmd.butler, clobber=self.clobberConfig, doBackup=self.doBackup)
        File "/software/lsstsw/stack/Linux64/pipe_base/13.0-12-gaf0c0ec+1/python/lsst/pipe/base/cmdLineTask.py", line 598, in writeConfig
          if not self.config.compare(oldConfig, shortcut=False, output=logConfigMismatch):
        File "/software/lsstsw/stack/Linux64/pex_config/13.0-3-g520d906+1/python/lsst/pex/config/config.py", line 785, in compare
          rtol=rtol, atol=atol, output=output)
        File "/software/lsstsw/stack/Linux64/pex_config/13.0-3-g520d906+1/python/lsst/pex/config/comparison.py", line 103, in compareConfigs
          result = field._compare(c1, c2, shortcut=shortcut, rtol=rtol, atol=atol, output=output)
        File "/software/lsstsw/stack/Linux64/pex_config/13.0-3-g520d906+1/python/lsst/pex/config/configurableField.py", line 292, in _compare
          return compareConfigs(name, c1, c2, shortcut=shortcut, rtol=rtol, atol=atol, output=output)
        File "/software/lsstsw/stack/Linux64/pex_config/13.0-3-g520d906+1/python/lsst/pex/config/comparison.py", line 103, in compareConfigs
          result = field._compare(c1, c2, shortcut=shortcut, rtol=rtol, atol=atol, output=output)
        File "/software/lsstsw/stack/Linux64/pex_config/13.0-3-g520d906+1/python/lsst/pex/config/config.py", line 370, in _compare
          v2 = getattr(instance2, self.name)
      AttributeError: 'GetCoaddAsTemplateConfig' object has no attribute 'doAddCalexpBackground'
      

        Attachments

          Issue Links

            Activity

            Hide
            swinbank John Swinbank added a comment -

            Another task framework issue for Fritz Mueller.

            Show
            swinbank John Swinbank added a comment - Another task framework issue for Fritz Mueller .
            Hide
            gkovacs Gabor Kovacs added a comment -

            Hit this bug today within the same context (task).

            Show
            gkovacs Gabor Kovacs added a comment - Hit this bug today within the same context (task).
            Hide
            swinbank John Swinbank added a comment -

            Oh, interesting. This looks like a duplicate of DM-16561, but I guess it's not if it's still causing problems... Gabor Kovacs, can you check if you're running pex_config of a w_2018_48 or later vintage?

            Show
            swinbank John Swinbank added a comment - Oh, interesting. This looks like a duplicate of DM-16561 , but I guess it's not if it's still causing problems... Gabor Kovacs , can you check if you're running pex_config of a w_2018_48 or later vintage?
            Hide
            gkovacs Gabor Kovacs added a comment -

            I can confirm that this was the same bug; resolved by DM-16561.

            Show
            gkovacs Gabor Kovacs added a comment - I can confirm that this was the same bug; resolved by DM-16561 .
            Hide
            swinbank John Swinbank added a comment -

            Great; thank you!

            Show
            swinbank John Swinbank added a comment - Great; thank you!

              People

              • Assignee:
                Unassigned
                Reporter:
                ctslater Colin Slater
                Watchers:
                Colin Slater, Gabor Kovacs, John Swinbank
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: