[
https://issues.apache.org/jira/browse/BEAM-12434?focusedWorklogId=604974&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-604974
]
ASF GitHub Bot logged work on BEAM-12434:
-----------------------------------------
Author: ASF GitHub Bot
Created on: 02/Jun/21 06:41
Start Date: 02/Jun/21 06:41
Worklog Time Spent: 10m
Work Description: codecov[bot] edited a comment on pull request #14916:
URL: https://github.com/apache/beam/pull/14916#issuecomment-852101759
#
[Codecov](https://codecov.io/gh/apache/beam/pull/14916?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
[#14916](https://codecov.io/gh/apache/beam/pull/14916?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
(bb35658) into
[master](https://codecov.io/gh/apache/beam/commit/3876ddb0963f392ad3127c1822dcc7a37912ee00?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
(3876ddb) will **decrease** coverage by `0.01%`.
> The diff coverage is `n/a`.
[](https://codecov.io/gh/apache/beam/pull/14916?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 #14916 +/- ##
==========================================
- Coverage 83.80% 83.78% -0.02%
==========================================
Files 435 435
Lines 58423 58421 -2
==========================================
- Hits 48961 48948 -13
- Misses 9462 9473 +11
```
| [Impacted
Files](https://codecov.io/gh/apache/beam/pull/14916?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
| Coverage Δ | |
|---|---|---|
|
[...examples/snippets/transforms/aggregation/latest.py](https://codecov.io/gh/apache/beam/pull/14916/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-YmVhbV9QcmVDb21taXRfUHl0aG9uX0Nyb24vc3JjL3Nka3MvcHl0aG9uL3Rlc3Qtc3VpdGVzL3RveC9weTM4L2J1aWxkL3NyY3Mvc2Rrcy9weXRob24vYXBhY2hlX2JlYW0vZXhhbXBsZXMvc25pcHBldHMvdHJhbnNmb3Jtcy9hZ2dyZWdhdGlvbi9sYXRlc3QucHk=)
| | |
|
[...python/apache\_beam/examples/streaming\_wordcount.py](https://codecov.io/gh/apache/beam/pull/14916/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-YmVhbV9QcmVDb21taXRfUHl0aG9uX0Nyb24vc3JjL3Nka3MvcHl0aG9uL3Rlc3Qtc3VpdGVzL3RveC9weTM4L2J1aWxkL3NyY3Mvc2Rrcy9weXRob24vYXBhY2hlX2JlYW0vZXhhbXBsZXMvc3RyZWFtaW5nX3dvcmRjb3VudC5weQ==)
| | |
|
[...beam/testing/benchmarks/nexmark/queries/query10.py](https://codecov.io/gh/apache/beam/pull/14916/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-YmVhbV9QcmVDb21taXRfUHl0aG9uX0Nyb24vc3JjL3Nka3MvcHl0aG9uL3Rlc3Qtc3VpdGVzL3RveC9weTM4L2J1aWxkL3NyY3Mvc2Rrcy9weXRob24vYXBhY2hlX2JlYW0vdGVzdGluZy9iZW5jaG1hcmtzL25leG1hcmsvcXVlcmllcy9xdWVyeTEwLnB5)
| | |
|
[...ython/apache\_beam/io/gcp/tests/bigquery\_matcher.py](https://codecov.io/gh/apache/beam/pull/14916/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-YmVhbV9QcmVDb21taXRfUHl0aG9uX0Nyb24vc3JjL3Nka3MvcHl0aG9uL3Rlc3Qtc3VpdGVzL3RveC9weTM4L2J1aWxkL3NyY3Mvc2Rrcy9weXRob24vYXBhY2hlX2JlYW0vaW8vZ2NwL3Rlc3RzL2JpZ3F1ZXJ5X21hdGNoZXIucHk=)
| | |
|
[...dks/python/apache\_beam/portability/api/\_\_init\_\_.py](https://codecov.io/gh/apache/beam/pull/14916/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-YmVhbV9QcmVDb21taXRfUHl0aG9uX0Nyb24vc3JjL3Nka3MvcHl0aG9uL3Rlc3Qtc3VpdGVzL3RveC9weTM4L2J1aWxkL3NyY3Mvc2Rrcy9weXRob24vYXBhY2hlX2JlYW0vcG9ydGFiaWxpdHkvYXBpL19faW5pdF9fLnB5)
| | |
|
[...sdks/python/apache\_beam/utils/interactive\_utils.py](https://codecov.io/gh/apache/beam/pull/14916/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-YmVhbV9QcmVDb21taXRfUHl0aG9uX0Nyb24vc3JjL3Nka3MvcHl0aG9uL3Rlc3Qtc3VpdGVzL3RveC9weTM4L2J1aWxkL3NyY3Mvc2Rrcy9weXRob24vYXBhY2hlX2JlYW0vdXRpbHMvaW50ZXJhY3RpdmVfdXRpbHMucHk=)
| | |
|
[...cs/sdks/python/apache\_beam/transforms/userstate.py](https://codecov.io/gh/apache/beam/pull/14916/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-YmVhbV9QcmVDb21taXRfUHl0aG9uX0Nyb24vc3JjL3Nka3MvcHl0aG9uL3Rlc3Qtc3VpdGVzL3RveC9weTM4L2J1aWxkL3NyY3Mvc2Rrcy9weXRob24vYXBhY2hlX2JlYW0vdHJhbnNmb3Jtcy91c2Vyc3RhdGUucHk=)
| | |
|
[...s/sdks/python/apache\_beam/testing/test\_pipeline.py](https://codecov.io/gh/apache/beam/pull/14916/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-YmVhbV9QcmVDb21taXRfUHl0aG9uX0Nyb24vc3JjL3Nka3MvcHl0aG9uL3Rlc3Qtc3VpdGVzL3RveC9weTM4L2J1aWxkL3NyY3Mvc2Rrcy9weXRob24vYXBhY2hlX2JlYW0vdGVzdGluZy90ZXN0X3BpcGVsaW5lLnB5)
| | |
|
[.../srcs/sdks/python/apache\_beam/io/external/kafka.py](https://codecov.io/gh/apache/beam/pull/14916/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-YmVhbV9QcmVDb21taXRfUHl0aG9uX0Nyb24vc3JjL3Nka3MvcHl0aG9uL3Rlc3Qtc3VpdGVzL3RveC9weTM4L2J1aWxkL3NyY3Mvc2Rrcy9weXRob24vYXBhY2hlX2JlYW0vaW8vZXh0ZXJuYWwva2Fma2EucHk=)
| | |
|
[...python/apache\_beam/runners/portability/\_\_init\_\_.py](https://codecov.io/gh/apache/beam/pull/14916/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-YmVhbV9QcmVDb21taXRfUHl0aG9uX0Nyb24vc3JjL3Nka3MvcHl0aG9uL3Rlc3Qtc3VpdGVzL3RveC9weTM4L2J1aWxkL3NyY3Mvc2Rrcy9weXRob24vYXBhY2hlX2JlYW0vcnVubmVycy9wb3J0YWJpbGl0eS9fX2luaXRfXy5weQ==)
| | |
| ... and [860
more](https://codecov.io/gh/apache/beam/pull/14916/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/14916?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/14916?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
[3876ddb...bb35658](https://codecov.io/gh/apache/beam/pull/14916?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.
For queries about this service, please contact Infrastructure at:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 604974)
Time Spent: 1h 40m (was: 1.5h)
> implement num_shard side_input to WriteToTFRecord
> -------------------------------------------------
>
> Key: BEAM-12434
> URL: https://issues.apache.org/jira/browse/BEAM-12434
> Project: Beam
> Issue Type: Improvement
> Components: io-py-tfrecord
> Affects Versions: 3.0.0, 2.29.0, 2.30.0, 2.31.0, 2.32.0
> Reporter: Johan Sternby
> Priority: P2
> Time Spent: 1h 40m
> Remaining Estimate: 0h
>
> {{As concisely explained in
> [https://stackoverflow.com/questions/49156159/can-i-pass-side-inputs-to-apache-beam-ptransforms|http://example.com/]
> }}
> EXAMPLES_PER_SHARD = 5.0
> num_tfexamples = tfexample_strs | "count tf examples" >>
> beam.combiners.Count.Globally()
> num_shards = num_tfexamples | ("compute number of shards" >>
> beam.Map(lambda num_examples:
> int(math.ceil(num_examples / EXAMPLES_PER_SHARD))))
> _ = tfexample_strs | ("output to tfrecords" >>
> beam.io.WriteToTFRecord(OUTPUT_DIR,
> num_shards=beam.pvalue.AsSingleton(num_shards)))
> fails with
> File "/usr/local/lib/python3.7/dist-packages/apache_beam/io/iobase.py", line
> 1011, in start_bundle
> self.counter = random.randint(0, self.count - 1)
> TypeError: unsupported operand type(s) for -: 'AsSingleton' and 'int' [while
> running 'output VALIDATION to
> tfrecords/Write/WriteImpl/ParDo(_RoundRobinKeyFn)']
> WriteToTFRecords op in the python SDK of apache-beam does currently not
> support side_input to num_shards.
> It can easily be solved by implementing the _RoundRobinKeyFn a bit
> differently and calling the ParDo with side_input instead of class init
> values.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)