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
    • Templates:
    • 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

          Container Issues

            Issue Links

              Activity

                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:

                    Summary Panel