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/06/04 23:31:39 UTC

[GitHub] [beam] damccorm opened a new issue, #21441: Figure out how type hints should work

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

   RunInference main interface could have many different types of input and ouput types.
   
    
   
   It probably should have generice typehints of some sort, but the code that infers them will need to be specified.
   
    
   
   I haven't yet figured out how to do this, but I'm convinced that getting really specific type hints will help our users find errors.
   
    
   
   We have
   
   @input output types unknown
   
   RunInference(PTransform)
     has RunInferenceDoFun (also input output types unknown)
       calls composedRunInferenceFn (input/output types known)
   
   we need to get correct type hints into the RunInference PTransform and it's not apparent how to do that exactly since annotations won't be possible.
   
    
   
   I think we'll need some correct values to put into the with_output_type chain in the ptransform.
   
   Imported from Jira [BEAM-14217](https://issues.apache.org/jira/browse/BEAM-14217). Original Jira may contain additional context.
   Reported by: Ryan.Thompson.
   Subtask of issue #21435


-- 
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] AnandInguva commented on issue #21441: Figure out how type hints should work

Posted by GitBox <gi...@apache.org>.
AnandInguva commented on issue #21441:
URL: https://github.com/apache/beam/issues/21441#issuecomment-1153868970

   One of the mypy errors ` Type variable "apache_beam.ml.inference.base._INPUT_TYPE" is unbound  [valid-type]`. Currently, we ignore these error as the `_INPUT_TYPE` and `__OUTPUT_TYPE` are unbounded and `mypy` needs generic variable to bounded source.


-- 
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