This is an automated email from the ASF dual-hosted git repository.
xqhu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/beam.git
The following commit(s) were added to refs/heads/master by this push:
new 8e242f96186 Revert "Avoid unreasonably long stage names for
@ptransform_fn. (#35547)" (#35622)
8e242f96186 is described below
commit 8e242f961861ba9289e4f394d9d4ac41cac82a19
Author: liferoad <[email protected]>
AuthorDate: Fri Jul 18 11:29:22 2025 -0400
Revert "Avoid unreasonably long stage names for @ptransform_fn. (#35547)"
(#35622)
This reverts commit d4d99a1d76fd1782c972f73312d16012ad0c9af3.
---
sdks/python/apache_beam/transforms/ptransform.py | 15 ++++-----------
1 file changed, 4 insertions(+), 11 deletions(-)
diff --git a/sdks/python/apache_beam/transforms/ptransform.py
b/sdks/python/apache_beam/transforms/ptransform.py
index 50b04e93cad..c4f0e3455d4 100644
--- a/sdks/python/apache_beam/transforms/ptransform.py
+++ b/sdks/python/apache_beam/transforms/ptransform.py
@@ -1030,18 +1030,11 @@ class _PTransformFnPTransform(PTransform):
pass
return self._fn(pcoll, *args, **kwargs)
- def default_label(self) -> str:
- # Attempt to give a reasonable name to this transform.
- # We want it to be reasonably unique, but also not sensitive to
- # irrelevent parameters to minimize pipeline-to-pipeline variance.
- # For now, use only the first argument (if any), iff it would not make
- # the name unwieldy.
+ def default_label(self):
if self._args:
- first_arg_string = label_from_callable(self._args[0])
- suffix = '(%s)' % first_arg_string if len(first_arg_string) <= 16 else ''
- else:
- suffix = ''
- return label_from_callable(self._fn) + suffix
+ return '%s(%s)' % (
+ label_from_callable(self._fn), label_from_callable(self._args[0]))
+ return label_from_callable(self._fn)
def ptransform_fn(fn):