Repository navigation
Conversation
Backport auto-label reportThis
|
Automated Reviewer SuggestionsBased on the
|
|
| config | throughput | MB/s | latency | max Δ latest / 7d | |
|---|---|---|---|---|---|
| 🔴 | bs=10 sw=10 sl=64 | 385 | 0.235 | 26,317/34,602/34,602 us | 🔴 +39.7% / 🔴 +143.9% |
| 🔴 | bs=100 sw=10 sl=64 | 956 | 0.583 | 102,739/149,072/149,072 us | 🔴 +22.5% / 🔴 +54.7% |
| ⚪ | bs=1000 sw=10 sl=64 | 1,121 | 0.684 | 888,305/998,918/998,918 us | ⚪ within ±5% / 🔴 +8.8% |
Baseline details
Latest main 8420565 from same runner
| config | metric | PR | latest main | 7d avg | Δ latest | Δ 7d |
|---|---|---|---|---|---|---|
| bs=10 sw=10 sl=64 | throughput | 385 tuples/sec | 476 tuples/sec | 880.16 tuples/sec | -19.1% | -56.3% |
| bs=10 sw=10 sl=64 | MB/s | 0.235 MB/s | 0.291 MB/s | 0.537 MB/s | -19.2% | -56.3% |
| bs=10 sw=10 sl=64 | p50 | 26,317 us | 18,842 us | 11,544 us | +39.7% | +128.0% |
| bs=10 sw=10 sl=64 | p95 | 34,602 us | 32,051 us | 14,186 us | +8.0% | +143.9% |
| bs=10 sw=10 sl=64 | p99 | 34,602 us | 32,051 us | 17,122 us | +8.0% | +102.1% |
| bs=100 sw=10 sl=64 | throughput | 956 tuples/sec | 997 tuples/sec | 1,151 tuples/sec | -4.1% | -17.0% |
| bs=100 sw=10 sl=64 | MB/s | 0.583 MB/s | 0.609 MB/s | 0.703 MB/s | -4.3% | -17.0% |
| bs=100 sw=10 sl=64 | p50 | 102,739 us | 101,019 us | 89,900 us | +1.7% | +14.3% |
| bs=100 sw=10 sl=64 | p95 | 149,072 us | 121,655 us | 96,346 us | +22.5% | +54.7% |
| bs=100 sw=10 sl=64 | p99 | 149,072 us | 121,655 us | 110,344 us | +22.5% | +35.1% |
| bs=1000 sw=10 sl=64 | throughput | 1,121 tuples/sec | 1,148 tuples/sec | 1,189 tuples/sec | -2.4% | -5.7% |
| bs=1000 sw=10 sl=64 | MB/s | 0.684 MB/s | 0.701 MB/s | 0.726 MB/s | -2.4% | -5.8% |
| bs=1000 sw=10 sl=64 | p50 | 888,305 us | 862,062 us | 873,675 us | +3.0% | +1.7% |
| bs=1000 sw=10 sl=64 | p95 | 998,918 us | 966,681 us | 918,440 us | +3.3% | +8.8% |
| bs=1000 sw=10 sl=64 | p99 | 998,918 us | 966,681 us | 953,075 us | +3.3% | +4.8% |
Raw CSV
config_idx,batch_size,schema_width,string_len,num_batches,total_ms,total_tuples,total_bytes,tuples_per_sec,mb_per_sec,lat_p50_us,lat_p95_us,lat_p99_us
0,10,10,64,20,519.36,200,128000,385,0.235,26317.35,34601.68,34601.68
1,100,10,64,20,2092.41,2000,1280000,956,0.583,102738.96,149072.43,149072.43
2,1000,10,64,20,17835.48,20000,12800000,1121,0.684,888305.47,998918.46,998918.46
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #9102 +/- ##
=========================================
Coverage 91.80% 91.81%
- Complexity 5020 5021 +1
=========================================
Files 1277 1277
Lines 56385 56346 -39
Branches 7365 7359 -6
=========================================
- Hits 51767 51734 -33
+ Misses 2760 2757 -3
+ Partials 1858 1855 -3
*This pull request uses carry forward flags. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
…before parsing it (apache#9306) ### What changes were proposed in this PR? `_read_binary_value` turned an image or audio cell into bytes whatever its size: the whole value was stripped, checked for HTML and base64-decoded, once per row. A remote fetch of the same payload already stops at `MAX_REMOTE_FETCH_BYTES` (25 MiB), so the same data was refused over HTTP and accepted from a column. The generated Python now checks a cell's size first, against the same constant: - a `bytes` cell is checked before it is returned - any other value is checked right after `str(value)`, before `strip()`, the HTML check, the decodes and the remote fetch An oversized value raises `ValueError("Column value exceeds the 26214400 character limit.")` (or `byte limit` for a `bytes` cell). Both callers already turn an exception into a per-row `Image data error` / `Audio data error`, so one oversized cell fails its own row and the run continues. Worth knowing: for a string the cap counts characters, so a base64 cell, which is 4 characters per 3 bytes, holds at most about 18.75 MiB of decoded data. Images are compressed to about 33 KB before they are sent anyway. ### Any related issues? Closes apache#8962 ### How was this PR tested? The tests were written first. - `HuggingFaceCodegenBaseSpec`: the size check comes before `strip()`, `_looks_like_html`, `base64.b64decode` and `_fetch_remote_url`, and the `bytes` branch is checked before it returns. - New `HuggingFaceBinaryValueBehaviorSpec`: it runs the generated `_read_binary_value` under a real interpreter, with the parsing helpers replaced by recorders. An oversized string or `bytes` value raises, and nothing parses it first. Values exactly at the limit are still parsed and returned. Before the change, a 26,214,401-character cell was checked for HTML and base64-decoded, and came back as 26 MB of bytes. All three new assertions failed on `main` and pass with the change. Reverting the change makes exactly those three fail again. The Hugging Face suites pass (173 tests), the generated Python of all 117 operators compiles, and scalafmt and scalafix are clean. The behaviour spec has its own small probe (`hf_binary_value_probe.py`) rather than extending `HuggingFaceParseBehaviorSpec`, because apache#9102 has that spec open. It uses the same interpreter lookup and method-lifting approach, so the two could share a helper once apache#9102 lands. ### Was this PR authored or co-authored using generative AI tooling? Yes, this PR was co-authored with Claude in compliance with ASF policy. Co-authored-by: Xuan Gu <[email protected]>
|
/request-review @xuang7 |
What changes were proposed in this PR?
ImageTaskCodegen.parsePythondecoded a chat provider's reply at four sites by indexing intochoices[0]and calling.geton the result. A choices value that is not a list of dictionaries ([null], "bad", [42]), or whose first choice has a non-dict message ([{"message": null}]), therefore raised AttributeError, which _parse_response's except (KeyError, IndexError, TypeError) does not catch. The row's cell ended up reading "Request failed" instead of the body.All four now delegate to
_chat_message_content, the shared type-checked helper added in #8617, which validates every level and returnsNonewhen the body is not a readable chat response. Each branch then falls back to its native shape or tojson.dumps(body), as before.This completes the work #8617 started: that PR deliberately left these four sites out to keep its diff to the files under review.
Any related issues?
Closes #8634
How was this PR tested?
Written test-first: the five image tasks were added to
HuggingFaceParseBehaviorSpec, which executes the generated parser against 12 malformed response shapes. They fail against the current code with exactly the reported error —task=visual-question-answering body={"choices": [null]}raisingAttributeError— and pass with the change.166 tests pass across the Hugging Face suites, and PythonCodeRawInvalidTextSpec py-compiles the generated Python for all 117 operators.
One shape was moved out of the shared malformed list:
[{"generated_text": "x"}]is a success path for the image codegens and an unrecognised shape for the text ones, so it is now asserted per task instead.Was this PR authored or co-authored using generative AI tooling?
Yes, this PR was co-authored with Claude in compliance with ASF policy.