Skip to content

Commit 02f647d

Browse files
committed
Fix naming of pipeline when defined with |
1 parent 91938d7 commit 02f647d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

labelled_functions/pipeline.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ def __or__(self, other):
6565
if isinstance(other, LabelledFunction):
6666
return pipeline(
6767
[*self.funcs, other],
68-
name=self.name,
68+
name=f"{self.name}{other.name}",
6969
return_intermediate_outputs=self.return_intermediate_outputs,
7070
default_values=_merge_default_values(self, other),
7171
)
@@ -83,14 +83,14 @@ def __ror__(self, other):
8383
if isinstance(other, LabelledFunction):
8484
return pipeline(
8585
[other, *self.funcs],
86-
name=self.name,
86+
name=f"{other.name}{self.name}",
8787
return_intermediate_outputs=self.return_intermediate_outputs,
8888
default_values=_merge_default_values(other, self),
8989
)
9090
elif isinstance(other, LabelledPipeline):
9191
return pipeline(
9292
[*other.funcs, *self.funcs],
93-
name=f"{self.name}{other.name}",
93+
name=f"{other.name}{self.name}",
9494
return_intermediate_outputs=self.return_intermediate_outputs or other.return_intermediate_outputs,
9595
default_values=_merge_default_values(other, self),
9696
)

0 commit comments

Comments
 (0)