Repository navigation
Conversation
Signed-off-by: Linze-Shi <linzeshi0@gmail.com>
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. |
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
|
This PR was classified as CI work. Routing: @yenuo26 via CI owner, CODEOWNERS; @NickCao via CODEOWNERS @LinzeShi, please review your own changes and leave a short self-review comment describing what you checked. PRs without author self-review may not be assigned a reviewer. Please take a look when you have a chance. If you would like an automated review, mention @vllm-omni-review-bot in a comment. |
|
Checked that the JPEG is complete before publication, the temporary file stays in the same directory, and failure cleanup preserves the previous cache. The regression fails on the base; all 20 focused image/video tests pass with four workers. The concurrent reader/writer probe and injected encoding/replace failures also pass. The full nightly job was not rerun. |
Omni ReviewBot triage noteAutomated triage of commit
These are automated triage suggestions only — the final decision belongs to the maintainers. |
yenuo26
left a comment
There was a problem hiding this comment.
Blocking (P0)
None.
Blocking (P1)
None.
Non-blocking
- Mirror the video failure-preserve UT.
test_synthetic_video.py::test_failed_cache_publication_preserves_old_fileis the negative control for the sameopen("xb")+os.replace+finally: unlink(missing_ok=True)publish path.test_image_cache_is_published_atomicallyonly covers the happy cold-publish path. Please add an image twin that seeds an existing JPEG, stubsos.replaceto raise, asserts the old bytes survive, and asserts no leftover.tmpfiles — the PR description already claims this was probed manually. - Strengthen the atomic probe like the video twin. Video’s
test_video_cache_is_published_atomicallyusesforce_regenerate=Trueagainst an existing cache and asserts readers still see the old complete file untilreplaceruns. The new image test assertsnot cache_path.exists()(first publish only). Prefer the same existing-cache / force-regenerate shape so a regression that truncates-in-place cannot slip past. - Docstring parity (optional).
generate_synthetic_videodocuments “Cache files are published atomically.”;generate_synthetic_imagestill does not. One short sentence matching the video wording would help the next reader.
Signed-off-by: Linze-Shi <linzeshi0@gmail.com>
Signed-off-by: Linze-Shi <linzeshi0@gmail.com>
Signed-off-by: Linze-Shi <linzeshi0@gmail.com>
|
Thanks! Added the failed replace test, switched the atomic test to regenerate over an existing cache, and added the docstring line. Image/video tests pass with four workers (21 passed). |
yenuo26
left a comment
There was a problem hiding this comment.
Blocking (P0)
No blocking P0/P1.
Blocking (P1)
None.
Non-blocking
None new on tip 6a45345d. Prior soft nits from the 2e97f534 pass are addressed: failed-replace preserve UT, force-regenerate atomic probe over an existing JPEG (readers still see old bytes until os.replace), and docstring parity with the video publisher.
Omni ReviewBot routing recordAssigned Strict on claude-code (mimo-v2.6-pro) under experiment |
Omni ReviewBot review statusReview for commit |
|
Closing since #9648 already landed the same atomic publication, plus recovery for incomplete caches and broader tests. Thanks for the reviews! |
Contributor intent
1. What outcome do you want to achieve?
Prevent parallel CPU test collection from failing on incomplete synthetic images.
2. What is the highest-leverage variable for that outcome?
A shared JPEG must be complete before its cache path becomes visible.
3. How will this work move that variable?
Encode the image, write a private temporary file, then atomically replace the cache entry.
4. Whose customer or user needs does this address, and what are those needs?
Contributors and CI maintainers need parallel tests to collect reliably.
Purpose
Fixes #9833.
Follow-up to #9784.
generate_synthetic_imagewrites directly to a shared JPEG cache, allowing another pytest worker to read a partial file. Nightly build 18703 fails during MiniMax H3 test collection withPIL.UnidentifiedImageError.Follow the existing video-cache publication pattern: write a unique temporary file in the same directory, close it, and replace the destination. Clean up the temporary file if publication fails.
Only the test helper and two regression tests change. Cache names, JPEG settings and public configuration are unchanged; no user documentation changes are needed.
Test Plan
Base:
4cbaec9d01466bcf023019afac8a268d7c0d9628. Candidate:6a45345d78a300d370a9563c4b1d2432b18e9182.Python 3.12.4, Pillow 13.0.0, NumPy 2.3.5, pytest 9.1.1 and pytest-xdist 3.8.0.
Test Result
Validation ran offline on CPU without model downloads. The full nightly job was not rerun.