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/10/05 20:07:59 UTC
[GitHub] [beam] chamikaramj opened a new issue, #23467: [Feature Request]: Python RunInference transform should be Schema-Aware
chamikaramj opened a new issue, #23467:
URL: https://github.com/apache/beam/issues/23467
### What would you like to happen?
Currently, Python RunInference transform takes a [parameterized input/output type](https://github.com/apache/beam/blob/master/sdks/python/apache_beam/ml/inference/base.py#L59) that may or may not be Schema-Aware. This makes it harder to use this transform for cases where we need a Schema-Aware/portable type (for example, Multi-language, SQL). For such cases, the transform may or may not be usable depending on the ModelHandler used. I think we need to update this transform so that users can directly operate on Schema-Aware input/output PCollections.
### Issue Priority
Priority: 2
### Issue Component
Component: run-inference
--
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] robertwb commented on issue #23467: [Feature Request]: Python RunInference transform should be Schema-Aware
Posted by GitBox <gi...@apache.org>.
robertwb commented on issue #23467:
URL: https://github.com/apache/beam/issues/23467#issuecomment-1269004415
Huge +1. Note that TF's natural input of TFExamples can easily (and automatically) be derived from schema'd data (and often models can take dicts of numpy arrays as well, as can other platforms, which is very schema-like).
@TheNeuralBit
--
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
[GitHub] [beam] TheNeuralBit commented on issue #23467: [Feature Request]: Python RunInference transform should be Schema-Aware
Posted by GitBox <gi...@apache.org>.
TheNeuralBit commented on issue #23467:
URL: https://github.com/apache/beam/issues/23467#issuecomment-1269044871
Thanks Cham, I'm surprised we didn't already have this tracked somewhere :)
We also need this for `df.predict` (or `predict(df, ..)`).
There are a couple of challenges here that have been rattling around in my head:
- For many ModelHandlers the input/output type is basically bag of numbers, e.g. a Tensor with dimensions (X,Y). It's ambiguous how these should be mapped to Beam schemas.
- It could be a schema with a single field of type `List[List[int64]]`
- Or perhaps one dimension correspond to the schema fields (e.g. X fields of type `List[int64]`)
- This is particularly problematic for the `df.predict` case, since the pandas type system doesn't support complex types.
- On the output side, we likely can't get a detailed, parameterized type to map back to Beam schemas. That is, we may know that the model produces a Tensor, but we don't know the dimensions, which one is the batch dimension, etc...:
- In some cases we may be able to use the `proxy` trick from the DataFrame API: pass through an instance with 0-length batch dimension and see what we get out. But I don't know if this will work universally.
--
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
[GitHub] [beam] chamikaramj commented on issue #23467: [Feature Request]: Python RunInference transform should be Schema-Aware
Posted by GitBox <gi...@apache.org>.
chamikaramj commented on issue #23467:
URL: https://github.com/apache/beam/issues/23467#issuecomment-1265736504
cc: @robertwb @rezarokni @damccorm
--
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