Repository navigation
Studio: reuse the VLM URL probe's downloads in the conversion - #15870
Merged
Merged
Conversation
[skip ci]
danielhanchen
marked this pull request as ready for review
October 29, 2026 09:11
Member
Author
|
@codex review |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Member
Author
|
@codex review |
|
Codex Review: Didn't find any major issues. More of your lovely PRs please. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes
For a vision dataset whose image column holds URLs and has more than 200 rows,
convert_to_vlm_formatfirst probes the first 200 URLs to estimate throughput and the broken-link rate, discards the results, and then the conversion loop downloads and decodes those same 200 images again.The probe now keeps each image it downloaded successfully, keyed by row, and the first conversion batch uses it instead of fetching the URL again. Everything else stays as it was:
random.choicefor list captions) still runs in both passes, so the number of draws from the global RNG is the same as before.failed_count, the fail-rate gate, the ETA text and the progress messages are all unchanged.futuresdict until the first batch started, and the finished list holds every converted image anyway, so peak memory does not grow.Results
I ran a local HTTP server that serves 64x64 JPEGs, returns 404 for every 11th row, and counts GET requests. Each arm ran 3 times.
After the change, the GET count is the row count plus the probe rows that failed and get retried. Before the change it was the row count plus 200. Both counts were identical across all repeats. On loopback the wall time is inside run-to-run noise. The saving shows up on real remote URLs: about 200 downloads per dataset, or roughly 200 / (probe throughput) seconds.
Tests
studio/backend/tests/test_vlm_probe_reuses_downloads.pywith 450 and 1200 rows, permanent and transient probe failures. It checks per-URL fetch counts, that transiently failed probe rows still convert, and the captions and pixels of every kept row. It fails before this change (probe rows are fetched twice) and passes after it.test_vlm_conversion_row_urls,test_vlm_null_caption_rows,test_vlm_probe_untrusted_rows,test_vlm_question_column,test_vlm_repo_relative_image_paths,test_vlm_text_only_rows) give 72 passed both before and after.py_compilepasses on Python 3.9 and 3.10.Not covered
convert_sharegpt_with_images_to_vlm_formatandconvert_llava_to_vlm_formathave no URL probe, so there was nothing to change there.