Re: [QUESTION] Why no auto labels?

2023-10-04 Thread Byron Ellis via user
This feels like something that maybe should be more explicit? Overloading the transform name to provide a unique stable id feels like perhaps too much magic... also maybe feels like this is leaking specific runner behavior? I get that it's convenient On Wed, Oct 4, 2023 at 9:16 AM Robert Bradshaw

Re: [QUESTION] Why no auto labels?

2023-10-04 Thread Robert Bradshaw via user
BeamJava and BeamPython have the exact same behavior: transform names within must be distinct [1]. This is because we do not necessarily know at pipeline construction time if the pipeline will be streaming or batch, or if it will be updated in the future, so the decision was made to impose this res

Re: [PYTHON] Yapf configurations to prevent workflow mangling

2023-10-04 Thread Joey Tran
Okay. I was hoping I'd find some simple flag to switch off/on but turns out it's just the google yapf style that doesn't mesh well with beam workflows (i.e. `based_on_style=google`). Will dig through yapf settings to see if there's a knob that can be used in conjunction with the google style to do

Re: [PYTHON] Yapf configurations to prevent workflow mangling

2023-10-04 Thread Joey Tran
Huh, the default yapf settings _do_ seem to play nicely with beam after all. I tried creating a bare dir and created a wordcount.py with one transform per line and tried formatting with both yapf==0.29 and yapf==0.31 (what we currently use), and both left the workflow nicely divided with one transf

Re: [PYTHON] Yapf configurations to prevent workflow mangling

2023-10-04 Thread Ahmed Abualsaud via user
Hey Joey, I had similar problems where yapf was reformatting every file until I explicitly installed yapf==0.29.0, which is what Beam uses . Can you check if you have a different version installe