Skip to content

Commit

Permalink
fix(SingleTask): pull tag from input_tags, when not explicitly config…
Browse files Browse the repository at this point in the history
…ured

Fixes bug introduced in bbbc6b4. Input
tags stopped being referenced when setting the tag on the output.

Needed to tag delayspectrum files properly in the daily pipeline.
  • Loading branch information
anjakefala committed Jan 20, 2022
1 parent c83f705 commit bb175e3
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion draco/core/task.py
Original file line number Diff line number Diff line change
Expand Up @@ -466,8 +466,15 @@ def _nan_process_output(self, output):
def _interpolation_dict(self, output):
# Get the set of variables the can be interpolated into the various strings
idict = dict(output.attrs)
if "tag" in output.attrs:
tag = output.attrs["tag"]
elif "input_tags" in output.attrs and len(output.attrs["input_tags"]):
tag = output.attrs["input_tags"][0]
else:
tag = self._count

idict.update(
tag=(output.attrs["tag"] if "tag" in output.attrs else self._count),
tag=tag,
count=self._count,
task=self.__class__.__name__,
key=(
Expand Down

0 comments on commit bb175e3

Please sign in to comment.