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

[GitHub] [beam] jrmccluskey commented on issue #27469: [Bug]: 16177 has type numpy.int64, but expected one of: bytes

jrmccluskey commented on issue #27469:
URL: https://github.com/apache/beam/issues/27469#issuecomment-1638285006

   The root of the problem here is that numpy.int64 is not an instance of an int, so the numpy.int64 isn't getting encoded before being dropped into the MonitoringInfo proto. That logic check is here: https://github.com/apache/beam/blob/41e6628498c6ebdfc2932c61b68bcbde4da1a47e/sdks/python/apache_beam/metrics/monitoring_infos.py#L202
   
   It looks like end-to-end we're expecting only int values to be aggregated within the Beam metric, but we don't necessarily encounter a hard check for that until we are trying to encode metric into a proto. It looks like the `inc()` and `dec()` methods get a type hint through their default params but `update()` doesn't enforce a type hint yet. Would you know if that is the method being used to work on the metric here? 
   
   


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