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

[GitHub] [beam] bvolpato opened a new pull request, #27461: [WIP] Reuse memory measurement for StateFetchingIterators

bvolpato opened a new pull request, #27461:
URL: https://github.com/apache/beam/pull/27461

   (no comment)


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


[GitHub] [beam] github-actions[bot] commented on pull request #27461: Light cache weigher for StateFetchingIterators

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #27461:
URL: https://github.com/apache/beam/pull/27461#issuecomment-1632567998

   Stopping reviewer notifications for this pull request: review requested by someone other than the bot, ceding control


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


[GitHub] [beam] robertwb merged pull request #27461: Light cache weigher for StateFetchingIterators

Posted by "robertwb (via GitHub)" <gi...@apache.org>.
robertwb merged PR #27461:
URL: https://github.com/apache/beam/pull/27461


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


[GitHub] [beam] Priyansdesai commented on pull request #27461: Light cache weigher for StateFetchingIterators

Posted by "Priyansdesai (via GitHub)" <gi...@apache.org>.
Priyansdesai commented on PR #27461:
URL: https://github.com/apache/beam/pull/27461#issuecomment-1638532197

   Bruno, can we send this for review given the state bug exists anyways? As long as that bug is not exaggerated by this, we send this for review? 


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


[GitHub] [beam] robertwb commented on a diff in pull request #27461: Light cache weigher for StateFetchingIterators

Posted by "robertwb (via GitHub)" <gi...@apache.org>.
robertwb commented on code in PR #27461:
URL: https://github.com/apache/beam/pull/27461#discussion_r1283830743


##########
sdks/java/fn-execution/src/main/java/org/apache/beam/sdk/fn/stream/DataStreams.java:
##########
@@ -185,15 +186,19 @@ public DataStreamDecoder(Coder<T> coder, PrefetchableIterator<ByteString> inputS
      * Skips any remaining bytes in the current {@link ByteString} moving to the next {@link
      * ByteString} in the underlying {@link ByteString} {@link Iterator iterator} and decoding
      * elements till at the next boundary.
+     *
+     * @param weightEstimatorFn Pass in what is the function to be used for the weight.
      */
-    public List<T> decodeFromChunkBoundaryToChunkBoundary() {
+    public WeightedList<T> decodeFromChunkBoundaryToChunkBoundary(
+        Function<T, Long> weightEstimatorFn) {
       inbound.currentStream = inputByteStrings.next().newInput();

Review Comment:
   Currently we're only keeping the total weight anyhow. (Keeping per-element weights seems to be a large expense, especially as the goal with these weights is to try to manage memory.)



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


[GitHub] [beam] bvolpato commented on a diff in pull request #27461: Light cache weigher for StateFetchingIterators

Posted by "bvolpato (via GitHub)" <gi...@apache.org>.
bvolpato commented on code in PR #27461:
URL: https://github.com/apache/beam/pull/27461#discussion_r1283832776


##########
sdks/java/fn-execution/src/main/java/org/apache/beam/sdk/fn/stream/DataStreams.java:
##########
@@ -185,15 +186,19 @@ public DataStreamDecoder(Coder<T> coder, PrefetchableIterator<ByteString> inputS
      * Skips any remaining bytes in the current {@link ByteString} moving to the next {@link
      * ByteString} in the underlying {@link ByteString} {@link Iterator iterator} and decoding
      * elements till at the next boundary.
+     *
+     * @param weightEstimatorFn Pass in what is the function to be used for the weight.
      */
-    public List<T> decodeFromChunkBoundaryToChunkBoundary() {
+    public WeightedList<T> decodeFromChunkBoundaryToChunkBoundary(
+        Function<T, Long> weightEstimatorFn) {
       inbound.currentStream = inputByteStrings.next().newInput();

Review Comment:
   Understand. Makes sense, doing the change.



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


[GitHub] [beam] codecov[bot] commented on pull request #27461: Light cache weigher for StateFetchingIterators

Posted by "codecov[bot] (via GitHub)" <gi...@apache.org>.
codecov[bot] commented on PR #27461:
URL: https://github.com/apache/beam/pull/27461#issuecomment-1664795719

   ## [Codecov](https://app.codecov.io/gh/apache/beam/pull/27461?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
   > Merging [#27461](https://app.codecov.io/gh/apache/beam/pull/27461?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) (b123e35) into [master](https://app.codecov.io/gh/apache/beam/commit/90809097260ec4252b746b97bd849efc412950f5?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) (9080909) will **increase** coverage by `8.97%`.
   > The diff coverage is `21.91%`.
   
   > :exclamation: Current head b123e35 differs from pull request most recent head f7bdf0e. Consider uploading reports for the commit f7bdf0e to get more accurate results
   
   ```diff
   @@            Coverage Diff             @@
   ##           master   #27461      +/-   ##
   ==========================================
   + Coverage   70.88%   79.85%   +8.97%     
   ==========================================
     Files         861      569     -292     
     Lines      104995    69013   -35982     
   ==========================================
   - Hits        74422    55109   -19313     
   + Misses      29015    13904   -15111     
   + Partials     1558        0    -1558     
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | go | `?` | |
   | python | `79.85% <21.91%> (+<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=apache#carryforward-flags-in-the-pull-request-comment) to find out more.
   
   | [Files Changed](https://app.codecov.io/gh/apache/beam/pull/27461?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
   |---|---|---|
   | [...amples/inference/huggingface\_question\_answering.py](https://app.codecov.io/gh/apache/beam/pull/27461?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c2Rrcy9weXRob24vYXBhY2hlX2JlYW0vZXhhbXBsZXMvaW5mZXJlbmNlL2h1Z2dpbmdmYWNlX3F1ZXN0aW9uX2Fuc3dlcmluZy5weQ==) | `0.00% <0.00%> (ø)` | |
   | [.../apache\_beam/ml/inference/huggingface\_inference.py](https://app.codecov.io/gh/apache/beam/pull/27461?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c2Rrcy9weXRob24vYXBhY2hlX2JlYW0vbWwvaW5mZXJlbmNlL2h1Z2dpbmdmYWNlX2luZmVyZW5jZS5weQ==) | `0.00% <0.00%> (ø)` | |
   | [sdks/python/apache\_beam/yaml/yaml\_mapping.py](https://app.codecov.io/gh/apache/beam/pull/27461?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c2Rrcy9weXRob24vYXBhY2hlX2JlYW0veWFtbC95YW1sX21hcHBpbmcucHk=) | `86.95% <ø> (ø)` | |
   | [sdks/python/apache\_beam/yaml/yaml\_transform.py](https://app.codecov.io/gh/apache/beam/pull/27461?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c2Rrcy9weXRob24vYXBhY2hlX2JlYW0veWFtbC95YW1sX3RyYW5zZm9ybS5weQ==) | `88.23% <75.00%> (-0.63%)` | :arrow_down: |
   | [sdks/python/apache\_beam/ml/inference/base.py](https://app.codecov.io/gh/apache/beam/pull/27461?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c2Rrcy9weXRob24vYXBhY2hlX2JlYW0vbWwvaW5mZXJlbmNlL2Jhc2UucHk=) | `94.72% <96.00%> (+0.08%)` | :arrow_up: |
   
   ... and [298 files with indirect coverage changes](https://app.codecov.io/gh/apache/beam/pull/27461/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
   
   :mega: We’re building smart automated test selection to slash your CI/CD build times. [Learn more](https://about.codecov.io/iterative-testing/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
   


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


[GitHub] [beam] bvolpato commented on pull request #27461: [WIP] Light cache weigher for StateFetchingIterators

Posted by "bvolpato (via GitHub)" <gi...@apache.org>.
bvolpato commented on PR #27461:
URL: https://github.com/apache/beam/pull/27461#issuecomment-1632536646

   Run Java PreCommit


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


[GitHub] [beam] bvolpato commented on pull request #27461: Light cache weigher for StateFetchingIterators

Posted by "bvolpato (via GitHub)" <gi...@apache.org>.
bvolpato commented on PR #27461:
URL: https://github.com/apache/beam/pull/27461#issuecomment-1632566107

   R: @robertwb 


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