Repository navigation
Tests: make the diffusion LM tests import inference on their own, count the diffusion shard - #17736
Conversation
…nt the diffusion shard
|
@codex review |
Codex Review Summary: ✅ CompletedThis 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. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8ef3f1519b
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
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".
💡 Codex Reviewunsloth/studio/backend/tests/test_diffusion_lm_studio.py Lines 88 to 89 in 8ef3f15 When ℹ️ 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". |
|
@codex review |
|
Codex Review: Didn't find any major issues. You're on a roll. 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". |
Summary
Follow-up to #17723, which moved
test_diffusion*into its own(Python 3.13, diffusion)backend shard. Two things went red once that shard ran (seen on a staging run against current main):Repo tests (CPU, studio)andworkflow-trigger lint:That test pins the number of parallel pytest runs on purpose, so a new shard has to be stated there. Backend CI: run test_diffusion* in its own pytest shard #17723 updated
test_ci_backend_pytest_shards.pybut missed this one. My mistake.(Python 3.13, diffusion): five tests instudio/backend/tests/test_diffusion_lm_studio.pyfail withPackageNotFoundError: No package metadata was found for unsloth_zoo:test_frame_relay_throttles_and_never_raises_into_the_samplertest_frame_relay_sends_zero_based_steps_and_honours_stop_sequencestest_frame_relay_cuts_frames_at_the_first_eostest_diffusion_eos_ids_match_the_sampler_cuttest_chat_diffusion_load_refuses_an_unmarked_model_and_keeps_the_token_boundaryThey import
core.inference.inference, which importsunsloth, and the backend job installs neitherunsloth_zoonortrl. They only passed in the old a-f shard because an earlier file on the same worker (test_audio_chat_load.py,test_chat_prompt_bos.py) had already imported that module with its ownunslothstubs and left it cached. In a shard of onlytest_diffusion*files that never happens. So these tests have depended on xdist scheduling since Studio: live denoising canvas for transformers diffusion LMs #13593; the split only made it deterministic.Change
tests/studio/test_backend_ci_parallel_isolation.py: 15 parallel runs, 5 backend shards.studio/backend/tests/test_diffusion_lm_studio.py: a smallinference_modfixture the five tests now take.unsloth_zoois installed, or the module is already imported, it returns the real module. Nothing changes there.unslothandunsloth.chat_templates(the same two names the other backend tests stub) throughmonkeypatch, and also drops the freshly importedcore.inference.inference. So no later test inherits a module bound to these stubs.Testing
diffusers,unsloth_zooandtrlhidden from import (the backend job's environment):test_diffusion_lm_studio.py,test_diffusion_int8_attention.pyandtest_diffusion_rocm_tag_detect.pyon their own. The five tests fail on main with the same error and pass here. They also pass with the real packages installed.test_audio_chat_load.pyandtest_chat_prompt_bos.py: 78 passed, 33 skipped in both orders.studio-backend-ci.yml(15 files): 341 passed, 3 skipped. The isolation test fails on main.test_backend_tests_stub_heavy_imports.pyandtest_sibling_imported_tests_import_their_helpers_top_level.py: pass.The other failures on the new shard come from #17718 and are fixed in #17737.