[ 
https://issues.apache.org/jira/browse/BEAM-11578?focusedWorklogId=773595&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-773595
 ]

ASF GitHub Bot logged work on BEAM-11578:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 23/May/22 16:57
            Start Date: 23/May/22 16:57
    Worklog Time Spent: 10m 
      Work Description: codecov[bot] commented on PR #17706:
URL: https://github.com/apache/beam/pull/17706#issuecomment-1134920304

   # 
[Codecov](https://codecov.io/gh/apache/beam/pull/17706?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
 Report
   > Merging 
[#17706](https://codecov.io/gh/apache/beam/pull/17706?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
 (d18c8b5) into 
[master](https://codecov.io/gh/apache/beam/commit/da4fcad9200862863e6de98b53ef4b1a2154b711?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
 (da4fcad) will **increase** coverage by `0.00%`.
   > The diff coverage is `100.00%`.
   
   ```diff
   @@           Coverage Diff           @@
   ##           master   #17706   +/-   ##
   =======================================
     Coverage   73.99%   73.99%           
   =======================================
     Files         695      695           
     Lines       91798    91798           
   =======================================
   + Hits        67926    67928    +2     
   + Misses      22624    22622    -2     
     Partials     1248     1248           
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | python | `83.74% <100.00%> (+<0.01%)` | :arrow_up: |
   
   Flags with carried forward coverage won't be shown. [Click 
here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#carryforward-flags-in-the-pull-request-comment)
 to find out more.
   
   | [Impacted 
Files](https://codecov.io/gh/apache/beam/pull/17706?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
 | Coverage Δ | |
   |---|---|---|
   | 
[...n/apache\_beam/runners/dataflow/dataflow\_metrics.py](https://codecov.io/gh/apache/beam/pull/17706/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9weXRob24vYXBhY2hlX2JlYW0vcnVubmVycy9kYXRhZmxvdy9kYXRhZmxvd19tZXRyaWNzLnB5)
 | `74.83% <100.00%> (ø)` | |
   | 
[sdks/python/apache\_beam/io/gcp/bigquery.py](https://codecov.io/gh/apache/beam/pull/17706/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9weXRob24vYXBhY2hlX2JlYW0vaW8vZ2NwL2JpZ3F1ZXJ5LnB5)
 | `64.99% <0.00%> (-0.12%)` | :arrow_down: |
   | 
[sdks/python/apache\_beam/transforms/core.py](https://codecov.io/gh/apache/beam/pull/17706/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9weXRob24vYXBhY2hlX2JlYW0vdHJhbnNmb3Jtcy9jb3JlLnB5)
 | `92.30% <0.00%> (ø)` | |
   | 
[...hon/apache\_beam/runners/worker/bundle\_processor.py](https://codecov.io/gh/apache/beam/pull/17706/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9weXRob24vYXBhY2hlX2JlYW0vcnVubmVycy93b3JrZXIvYnVuZGxlX3Byb2Nlc3Nvci5weQ==)
 | `93.55% <0.00%> (+0.12%)` | :arrow_up: |
   | 
[...ks/python/apache\_beam/runners/worker/sdk\_worker.py](https://codecov.io/gh/apache/beam/pull/17706/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9weXRob24vYXBhY2hlX2JlYW0vcnVubmVycy93b3JrZXIvc2RrX3dvcmtlci5weQ==)
 | `89.09% <0.00%> (+0.15%)` | :arrow_up: |
   | 
[sdks/python/apache\_beam/utils/interactive\_utils.py](https://codecov.io/gh/apache/beam/pull/17706/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9weXRob24vYXBhY2hlX2JlYW0vdXRpbHMvaW50ZXJhY3RpdmVfdXRpbHMucHk=)
 | `97.56% <0.00%> (+2.43%)` | :arrow_up: |
   
   ------
   
   [Continue to review full report at 
Codecov](https://codecov.io/gh/apache/beam/pull/17706?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn 
more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by 
[Codecov](https://codecov.io/gh/apache/beam/pull/17706?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
 Last update 
[da4fcad...d18c8b5](https://codecov.io/gh/apache/beam/pull/17706?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
 Read the [comment 
docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   




Issue Time Tracking
-------------------

    Worklog Id:     (was: 773595)
    Time Spent: 1.5h  (was: 1h 20m)

> `dataflow_metrics` (python) fails with TypeError (when int overflowing?)
> ------------------------------------------------------------------------
>
>                 Key: BEAM-11578
>                 URL: https://issues.apache.org/jira/browse/BEAM-11578
>             Project: Beam
>          Issue Type: Bug
>          Components: sdk-py-core
>    Affects Versions: 2.25.0
>            Reporter: Romain Yon
>            Assignee: Yi Hu
>            Priority: P1
>          Time Spent: 1.5h
>  Remaining Estimate: 0h
>
> Hi all,
> It seems like the python beam job I'm running is failing because of a bug in 
> beam's metrics.
> The logic of the job appears to work and the final output is successfully 
> being written on GCS, but the dataflow job throws and error and has a failed 
> status:
> ```
> Traceback (most recent call last):
>  File "path/to/my/code.py", line 11, in <module>
>  MyJob().run()
>  File "/path/to/my/lib.py", line 173, in run
>  for c in result.metrics().query()["counters"]
>  File 
> "/usr/local/lib/python3.7/site-packages/apache_beam/runners/dataflow/dataflow_metrics.py",
>  line 261, in query
>  self._populate_metrics(response, metric_results, user_metrics=True)
>  File 
> "/usr/local/lib/python3.7/site-packages/apache_beam/runners/dataflow/dataflow_metrics.py",
>  line 188, in _populate_metrics
>  attempted = self._get_metric_value(metric['tentative'])
>  File 
> "/usr/local/lib/python3.7/site-packages/apache_beam/runners/dataflow/dataflow_metrics.py",
>  line 224, in _get_metric_value
>  lambda x: x.key == 'sum').value.double_value)
> TypeError: int() argument must be a string, a bytes-like object or a number, 
> not 'NoneType'
> ```
> Note that prior to this stacktrace, there is a logging entry:
> ```
> {"severity": "INFO", "message": "Distribution metric sum value seems to have 
> overflowed integer_value range, the correctness of sum or mean value may not 
> be guaranteed: <JsonValue\\n object_value: <JsonObject\\n properties: 
> [<Property\\n key: \'count\'\\n value: <JsonValue\\n integer_value: 96>>, 
> <Property\\n key: \'mean\'\\n value: <JsonValue\\n integer_value: 0>>, 
> <Property\\n key: \'max\'\\n value: <JsonValue\\n integer_value: 0>>, 
> <Property\\n key: \'min\'\\n value: <JsonValue\\n integer_value: 0>>, 
> <Property\\n key: \'sum\'\\n value: <JsonValue\\n integer_value: 0>>]>>"}
> ```
> I guess there seems to be an issue while casting the overflowing int to a 
> double.
> (Note: We don't really have control over the number of events being fired 
> since the metrics are emitted by `tensorflow_transform.beam.TransformDataset`)



--
This message was sent by Atlassian Jira
(v8.20.7#820007)

Reply via email to