You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by GitBox <gi...@apache.org> on 2022/11/02 21:23:37 UTC
[GitHub] [beam] TheNeuralBit opened a new issue, #23953: [Feature Request]: "Unable to find BatchConverter" error should identify where the problematic typehints came from
TheNeuralBit opened a new issue, #23953:
URL: https://github.com/apache/beam/issues/23953
### What would you like to happen?
Currently, we yield an error like this:
```
Traceback (most recent call last):
File "simple_numeric.py", line 71, in <module>
batched_circle_montecarlo(100000)
File "simple_numeric.py", line 60, in batched_circle_montecarlo
p
File "/tmp/tmp.PH23v4EA7w/venv/lib/python3.8/site-packages/apache_beam/pvalue.py", line 137, in __or__
return self.pipeline.apply(ptransform, self)
File "/tmp/tmp.PH23v4EA7w/venv/lib/python3.8/site-packages/apache_beam/pipeline.py", line 709, in apply
pvalueish_result = self.runner.apply(transform, pvalueish, self._options)
File "/tmp/tmp.PH23v4EA7w/venv/lib/python3.8/site-packages/apache_beam/runners/runner.py", line 185, in apply
return m(transform, input, options)
File "/tmp/tmp.PH23v4EA7w/venv/lib/python3.8/site-packages/apache_beam/runners/runner.py", line 215, in apply_PTransform
return transform.expand(input)
File "/tmp/tmp.PH23v4EA7w/venv/lib/python3.8/site-packages/apache_beam/transforms/core.py", line 1580, in expand
self.infer_batch_converters(pcoll.element_type)
File "/tmp/tmp.PH23v4EA7w/venv/lib/python3.8/site-packages/apache_beam/transforms/core.py", line 1533, in infer_batch_converters
self.fn.output_batch_converter = BatchConverter.from_typehints(
File "/tmp/tmp.PH23v4EA7w/venv/lib/python3.8/site-packages/apache_beam/typehints/batch.py", line 90, in from_typehints
raise TypeError(
TypeError: Unable to find BatchConverter for element_type Any and batch_type <class 'numpy.ndarray'>
```
It's not immediately obvious that this is complaining about the _output_ type of this DoFn. We should:
- Make this error identify the DoFn and if the issue is with input or output types
- If the issue is with output types and element type is `Any`, we may nudge them to define `infer_output_type`, as this is a common mistake.
### Issue Priority
Priority: 2
### Issue Component
Component: sdk-py-core
--
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
[GitHub] [beam] TheNeuralBit closed issue #23953: [Feature Request]: "Unable to find BatchConverter" error should identify where the problematic typehints came from
Posted by GitBox <gi...@apache.org>.
TheNeuralBit closed issue #23953: [Feature Request]: "Unable to find BatchConverter" error should identify where the problematic typehints came from
URL: https://github.com/apache/beam/issues/23953
--
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