[
https://issues.apache.org/jira/browse/BEAM-13384?focusedWorklogId=690983&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-690983
]
ASF GitHub Bot logged work on BEAM-13384:
-----------------------------------------
Author: ASF GitHub Bot
Created on: 06/Dec/21 13:09
Start Date: 06/Dec/21 13:09
Worklog Time Spent: 10m
Work Description: codecov[bot] commented on pull request #16139:
URL: https://github.com/apache/beam/pull/16139#issuecomment-986759736
#
[Codecov](https://codecov.io/gh/apache/beam/pull/16139?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
[#16139](https://codecov.io/gh/apache/beam/pull/16139?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
(e9b2015) into
[master](https://codecov.io/gh/apache/beam/commit/b1aaf441c2370f78ae84b77aa8e59be4e00abf71?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
(b1aaf44) will **increase** coverage by `9.01%`.
> The diff coverage is `100.00%`.
[](https://codecov.io/gh/apache/beam/pull/16139?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
```diff
@@ Coverage Diff @@
## master #16139 +/- ##
==========================================
+ Coverage 74.60% 83.62% +9.01%
==========================================
Files 642 447 -195
Lines 81001 61545 -19456
==========================================
- Hits 60434 51466 -8968
+ Misses 19598 10079 -9519
+ Partials 969 0 -969
```
| [Impacted
Files](https://codecov.io/gh/apache/beam/pull/16139?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
| Coverage Δ | |
|---|---|---|
|
[sdks/python/apache\_beam/\_\_init\_\_.py](https://codecov.io/gh/apache/beam/pull/16139/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-c2Rrcy9weXRob24vYXBhY2hlX2JlYW0vX19pbml0X18ucHk=)
| `85.00% <100.00%> (+0.78%)` | :arrow_up: |
|
[sdks/python/apache\_beam/internal/metrics/metric.py](https://codecov.io/gh/apache/beam/pull/16139/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-c2Rrcy9weXRob24vYXBhY2hlX2JlYW0vaW50ZXJuYWwvbWV0cmljcy9tZXRyaWMucHk=)
| `90.00% <0.00%> (-1.00%)` | :arrow_down: |
|
[...ks/python/apache\_beam/runners/worker/sdk\_worker.py](https://codecov.io/gh/apache/beam/pull/16139/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==)
| `88.90% <0.00%> (-0.16%)` | :arrow_down: |
|
[sdks/go/pkg/beam/core/runtime/exec/cogbk.go](https://codecov.io/gh/apache/beam/pull/16139/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-c2Rrcy9nby9wa2cvYmVhbS9jb3JlL3J1bnRpbWUvZXhlYy9jb2diay5nbw==)
| | |
|
[sdks/go/pkg/beam/core/graph/coder/row.go](https://codecov.io/gh/apache/beam/pull/16139/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-c2Rrcy9nby9wa2cvYmVhbS9jb3JlL2dyYXBoL2NvZGVyL3Jvdy5nbw==)
| | |
|
[...pkg/beam/runners/dataflow/dataflowlib/translate.go](https://codecov.io/gh/apache/beam/pull/16139/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-c2Rrcy9nby9wa2cvYmVhbS9ydW5uZXJzL2RhdGFmbG93L2RhdGFmbG93bGliL3RyYW5zbGF0ZS5nbw==)
| | |
|
[sdks/go/pkg/beam/schema.go](https://codecov.io/gh/apache/beam/pull/16139/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-c2Rrcy9nby9wa2cvYmVhbS9zY2hlbWEuZ28=)
| | |
|
[sdks/go/pkg/beam/core/runtime/exec/window.go](https://codecov.io/gh/apache/beam/pull/16139/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-c2Rrcy9nby9wa2cvYmVhbS9jb3JlL3J1bnRpbWUvZXhlYy93aW5kb3cuZ28=)
| | |
|
[sdks/go/pkg/beam/core/graph/coder/map.go](https://codecov.io/gh/apache/beam/pull/16139/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-c2Rrcy9nby9wa2cvYmVhbS9jb3JlL2dyYXBoL2NvZGVyL21hcC5nbw==)
| | |
|
[sdks/go/pkg/beam/core/metrics/store.go](https://codecov.io/gh/apache/beam/pull/16139/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-c2Rrcy9nby9wa2cvYmVhbS9jb3JlL21ldHJpY3Mvc3RvcmUuZ28=)
| | |
| ... and [188
more](https://codecov.io/gh/apache/beam/pull/16139/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
| |
------
[Continue to review full report at
Codecov](https://codecov.io/gh/apache/beam/pull/16139?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/16139?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
[b1aaf44...e9b2015](https://codecov.io/gh/apache/beam/pull/16139?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).
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 690983)
Time Spent: 0.5h (was: 20m)
> apache_beam does not explicitly re-export metrics
> -------------------------------------------------
>
> Key: BEAM-13384
> URL: https://issues.apache.org/jira/browse/BEAM-13384
> Project: Beam
> Issue Type: Bug
> Components: sdk-py-core
> Reporter: Sergei Lebedev
> Priority: P2
> Time Spent: 0.5h
> Remaining Estimate: 0h
>
> {{apache_beam/__init__.py}} does not re-export the {{metrics}} subpackage and
> thus forces users to rely on import time side-effects. Specifically, it seems
> fairly common to create metrics as
> {code:java}
> import apache_beam as beam
> # ...
> c = beam.metrics.Metrics.counter("ns", "counter"){code}
> This works at runtime, because {{apache_beam}} imports the {{metrics}}
> subpackage indirectly through one of its dependencies and get the "metrics"
> attribute as a side-effect of that import (see [last
> paragraph|https://docs.python.org/3/reference/import.html#submodules] in "The
> import system" for an explanation of how that works).
> Examples from GitHub
> *
> [tensorflow/transform|https://github.com/tensorflow/transform/blob/e0331bda765b7cc34347b38da74270dd3c01939b/tensorflow_transform/beam/impl.py#L282]
> *
> [tensorflow/tfx|https://github.com/tensorflow/tfx/blob/578c40cc23d5dd661826f5ed0e16db58479db1b4/tfx/components/transform/executor.py#L600]
> *
> [google-research/tapas|https://github.com/google-research/tapas/blob/f3d9f068e6eedb252883049b582516a1294ff951/tapas/utils/pretrain_utils.py#L65]
> *
> [google/tensorflow-recorder|https://github.com/google/tensorflow-recorder/blob/231b2c5422593d4eb7fc8502d5023425d08bedd6/tfrecorder/beam_pipeline.py#L141]
> *
> [kubeflow/examples|https://github.com/kubeflow/examples/blob/fcd2ef38027c1c0a91af2370c2beedb4c24298a8/code_search/src/code_search/dataflow/do_fns/prediction_do_fn.py#L112]
> I think we should re-export metrics in {{apache_beam/__init__.py,}} similarly
> to coders and io. Apart from legalizing a common way of defining metrics,
> this would also make {{apache_beam}} more tooling friendly, since type
> checkers and IDEs would be able to understand what {{apache_beam.metrics}}
> refers to without any Beam-specific logic/hacks.
--
This message was sent by Atlassian Jira
(v8.20.1#820001)