You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by "shunping (via GitHub)" <gi...@apache.org> on 2025/04/07 17:06:35 UTC

[I] [Bug]: Prism raises error when running a Python SDK pipeline with Create transform [beam]

shunping opened a new issue, #34564:
URL: https://github.com/apache/beam/issues/34564

   ### What happened?
   
   When running a Python pipeline with Create transform on prism, prism raises an error.
   
   ```python
   with beam.Pipeline(options=options) as p:
     _ = (p | beam.Create([1]) | beam.Map(print))
   ```
   
   Prism error:
   ```
   "found 1 uses of features unimplemented in prism in job job:
   unsupported feature "PTransform.Spec.Urn" set with value beam:transform:pickled_python:v1 Create/MaybeReshuffle"
   ```
   
   The problem is related to `MaybeReshuffle` at https://github.com/apache/beam/blob/v2.64.0/sdks/python/apache_beam/transforms/core.py#L3971, where in this case, the exact same input pcollection is returned as the output pcollection.
   
   Here is another simple example to trigger the problem.
   ```
   class EmptyTransform(beam.PTransform):
     def expand(self, input):
       return input
   
   with beam.Pipeline(options=options) as p:
     _ = (p | beam.Impulse() | EmptyTransform() | beam.Map(print))
   ```
   
   Prism error:
   ```
   "found 1 uses of features unimplemented in prism in job job:
   unsupported feature "PTransform.Spec.Urn" set with value beam:transform:pickled_python:v1 EmptyTransform"
   ```
   
   Here is the proto of that transform in the pipeline proto:
   
   ![Image](https://github.com/user-attachments/assets/f014b148-f8b2-4754-be71-a582de990550)
   
   ### Issue Priority
   
   Priority: 2 (default / most bugs should be filed as P2)
   
   ### Issue Components
   
   - [ ] Component: Python SDK
   - [ ] Component: Java SDK
   - [ ] Component: Go SDK
   - [ ] Component: Typescript SDK
   - [ ] Component: IO connector
   - [ ] Component: Beam YAML
   - [ ] Component: Beam examples
   - [ ] Component: Beam playground
   - [ ] Component: Beam katas
   - [ ] Component: Website
   - [ ] Component: Infrastructure
   - [ ] Component: Spark Runner
   - [ ] Component: Flink Runner
   - [ ] Component: Samza Runner
   - [ ] Component: Twister2 Runner
   - [ ] Component: Hazelcast Jet Runner
   - [ ] Component: Google Cloud Dataflow Runner


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Bug]: Prism raises error when running a Python SDK pipeline with Create transform [beam]

Posted by "lostluck (via GitHub)" <gi...@apache.org>.
lostluck closed issue #34564: [Bug]: Prism raises error when running a Python SDK pipeline with Create transform
URL: https://github.com/apache/beam/issues/34564


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Bug]: Prism raises error when running a Python SDK pipeline with Create transform [beam]

Posted by "shunping (via GitHub)" <gi...@apache.org>.
shunping commented on issue #34564:
URL: https://github.com/apache/beam/issues/34564#issuecomment-2784069140

   In the examples, there is an "empty" transform with zero subtransforms (not meeting the requirement of https://github.com/apache/beam/blob/56e11aa1dabf5031e987d34fe804fd53bf11c429/sdks/go/pkg/beam/runners/prism/internal/jobservices/management.go#L242), but non-empty payload (not meeting the requirement of https://github.com/apache/beam/blob/56e11aa1dabf5031e987d34fe804fd53bf11c429/sdks/go/pkg/beam/runners/prism/internal/jobservices/management.go#L248). Therefore, it falls through to the check on https://github.com/apache/beam/blob/56e11aa1dabf5031e987d34fe804fd53bf11c429/sdks/go/pkg/beam/runners/prism/internal/jobservices/management.go#L253.
   
   Only fixing the checking in jobservices/management is not enough, as then the `empty` transform and the transform prior to it will have the same output pcollection, which will lead to another error raised about "two producers on the same pcollection" ( https://github.com/apache/beam/blob/56e11aa1dabf5031e987d34fe804fd53bf11c429/sdks/go/pkg/beam/runners/prism/internal/preprocess.go#L354)
   
   To fix the second issue, we will have to skip the "empty" transform during graph preparation (prior to sorting the topology), since it is an no-op that causes prism confused.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org