Skip to content

Commit

Permalink
Merge pull request #1002 from CoffeaTeam/dask-layer-cosmetics
Browse files Browse the repository at this point in the history
fix: make dask layer name shorthands easier to read
  • Loading branch information
lgray authored Jan 20, 2024
2 parents cebdce1 + 065fddb commit 36aa25b
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/coffea/jetmet_tools/CorrectedJetsFactory.py
Original file line number Diff line number Diff line change
Expand Up @@ -434,6 +434,6 @@ def build_variant(unc, template, jetpt, jetpt_orig, jetmass, jetmass_orig):
_AwkwardRewrapFn(gfunc=rewrap_recordarray),
out,
jets,
label="corrected-jets",
label="corrected_jets",
meta=out_meta,
)
2 changes: 1 addition & 1 deletion src/coffea/jetmet_tools/FactorizedJetCorrector.py
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ def getSubCorrections(self, **kwargs):
corrections.append(
func(
*fargs,
dask_label=f"{self._campaign}-{self._dataera}-{self._datatype}-{self._levels[i]}-{self._jettype}",
dask_label=f"{self._campaign}_{self._dataera}_{self._datatype}_{self._levels[i]}_{self._jettype}",
)
)
else:
Expand Down
2 changes: 1 addition & 1 deletion src/coffea/jetmet_tools/JetCorrectionUncertainty.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ def getUncertainty(self, **kwargs):
uncs.append(
func(
*args,
dask_label=f"{self._campaign}-{self._dataera}-{self._datatype}-{self._levels[i]}-{self._jettype}",
dask_label=f"{self._campaign}_{self._dataera}_{self._datatype}_{self._levels[i]}_{self._jettype}",
)
)
else:
Expand Down
2 changes: 1 addition & 1 deletion src/coffea/jetmet_tools/JetResolution.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ def getResolution(self, **kwargs):
resos.append(
func(
*args,
dask_label=f"{self._campaign}-{self._dataera}-{self._datatype}-{self._levels[i]}-{self._jettype}",
dask_label=f"{self._campaign}_{self._dataera}_{self._datatype}_{self._levels[i]}_{self._jettype}",
)
)
else:
Expand Down
2 changes: 1 addition & 1 deletion src/coffea/jetmet_tools/JetResolutionScaleFactor.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ def getScaleFactor(self, **kwargs):
sfs.append(
func(
*args,
dask_label=f"{self._campaign}-{self._dataera}-{self._datatype}-{self._levels[i]}-{self._jettype}",
dask_label=f"{self._campaign}_{self._dataera}_{self._datatype}_{self._levels[i]}_{self._jettype}",
)
)
else:
Expand Down
2 changes: 1 addition & 1 deletion src/coffea/ml_tools/helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ def __call__(self, wrapper, *args):
wrap,
self._delayed_wrapper,
*packed_args,
label=f"numpy_call_{self.__class__.__name__}_",
label=f"numpy_call_{self.__class__.__name__}",
meta=wrap_meta,
)
arr = unpack_ret_array(arr)
Expand Down
2 changes: 1 addition & 1 deletion src/coffea/nanoevents/methods/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ def _apply_global_index(self, dask_array, index):
return dask_array.map_partitions(
_ClassMethodFn("_apply_global_index"),
index,
label="_apply_global_index",
label="apply_global_index",
)

@dask_method(no_dispatch=True)
Expand Down
2 changes: 1 addition & 1 deletion src/coffea/nanoevents/methods/physlite.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ def _get_target_offsets(load_column, event_index):
):
# wrap in map_partitions if dask arrays
return dask_awkward.map_partitions(
_get_target_offsets, load_column, event_index
_get_target_offsets, load_column, event_index, label="get_target_offsets"
)

offsets = load_column.layout.offsets.data
Expand Down

0 comments on commit 36aa25b

Please sign in to comment.