Repository navigation
Repo tests (CPU): one shard for each new gloo test file; explicit encoding in test_bind_local_cuda_device - #17892
Conversation
…he encoding in test_bind_local_cuda_device #17862 added tests/test_tokenizer_save_ddp_gloo.py, which no shard collects (gloo skips test_t*, rest ignores *gloo*). #17868 added tests/test_ddp_push_rank0_gloo.py, which both gloo and rest-2 (test_[dimsu]*) collect. test_no_file_is_dropped_or_run_twice failed on main. gloo now takes test_t[!p]*gloo*.py and rest-2 ignores test_[dimsu]*gloo*.py. #17867's read_text() in test_bind_local_cuda_device.py now passes encoding = "utf-8" (test_source_read_encoding).
|
@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: 1036fa78e7
ℹ️ 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".
…t filter file roots An --ignore-glob does not filter the shell-expanded file arguments of tests/test_[dimsu]*.py, so the previous commit left test_ddp_push_rank0_gloo.py in both rest-2 and gloo. gloo's first glob now skips those letters instead, and _claiming_shards counts a file root as claiming even when an ignore matches it, as pytest does, so the shard test catches this case.
|
@codex review |
|
Codex Review: Didn't find any major issues. What shall we delve into next? 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". |
…iniMax LoRA sidecar read (#17913) ## Summary Two checks are red on main right now: 1. **`Repo tests (CPU, rest)`: `tests/test_ci_repo_cpu_shards.py::TestEveryGlobRootMatchesAFile::test_no_shard_hands_pytest_an_unexpanded_pattern`** ``` AssertionError: these shard globs match no test file: [('gloo', 'tests/test_t[!p]*gloo*.py')] ``` #17892 added `tests/test_t[!p]*gloo*.py` to the gloo shard so that `tests/test_tokenizer_save_ddp_gloo.py` (from #17862) was collected by some shard. #17882 landed at the same time and renamed that file to `tests/test_local_save_tokenizer_ddp_gloo.py`, which the gloo shard's first glob (`tests/test_[!dfimpstu]*gloo*.py`) already covers. The `test_t[!p]` glob now matches nothing, and an unmatched glob reaches pytest as a literal path. Both PRs were right on their own; together they leave one dead glob. 2. **`(Python 3.13, rest)` and `Repo tests (CPU, rest)`: the text I/O encoding gates** ``` test_text_io_names_its_encoding[diffusion_minimax_h3_image.py] assert not ['diffusion_minimax_h3_image.py:3422: read_text() without encoding'] ``` #17863 added `json.loads(sidecar.read_text())` for the LoRA `adapter_config.json` sidecar. Without an encoding that read uses the locale codepage on Windows. ## Change - `.github/workflows/studio-backend-ci.yml`: remove `tests/test_t[!p]*gloo*.py` from the gloo shard and restore the comment that a `test_t[!p]*` gloo file would be reported as dropped by `tests/test_ci_repo_cpu_shards.py` (with a note on why the glob is not kept for later: an unmatched glob is a missing file to pytest). - `studio/backend/core/inference/diffusion_minimax_h3_image.py`: `sidecar.read_text(encoding = "utf-8")`. JSON is UTF-8, so behaviour on Linux and macOS is unchanged. ## Testing - `tests/test_ci_repo_cpu_shards.py` and `test_text_io_encoding.py::test_text_io_names_its_encoding[diffusion_minimax_h3_image.py]`: 16 passed on this branch, 2 failed on main. - `tests/test_runtime_text_encoding.py` and `studio/backend/tests/test_diffusion_minimax_h3_image.py` pass; `studio/backend/tests/test_text_io_encoding.py` passes for every tracked file.
…he gloo shard (2100 s cap) (#17969) ## Summary `Repo tests (CPU, gloo)` is timing out again: the shard's pytest runs under `timeout --signal=INT 2100` and recent runs were cut off there with nothing failing: | run | result | |---|---| | #17934 (upstream) | 257 passed, 3 skipped in 2089.55 s, exit 124 | | staging run of #17904 | 258 passed, 3 skipped in 2095.11 s, exit 124 | | staging run of #17957 | 251 passed, 1 failed in 2096.44 s, exit 124 | For comparison the same shard ran 241 tests in 1292 s when #17892 merged this morning. Since then #17886 (`test_tp_dpo_peft_ref_adapter_gloo.py`), #17930 (`test_cp_ulysses_media_towers_gloo.py`), `test_cp_ulysses_dynamic_len_gloo.py` and the DeepSeek-V4.1 additions to `test_parallel_deepseek_v41_gloo.py` landed in it, and a slower runner now goes over the cap. Every one of those tests passes; the shard just no longer fits. ## Change - `.github/workflows/studio-backend-ci.yml`: `tests/test_tp_[!n]*gloo*.py` (the non-native tensor parallel files: `tp_env`, `tp_eval`, `tp_full_finetune`, `tp_replica`, `tp_kv_replicated`, `tp_moe_dropout`, `tp_dpo_peft_ref_adapter`, ...; 12 files) moves out of `gloo` into a new `gloo-tp-env` shard. `gloo` keeps its other three globs (19 files). Comment added with the numbers above. - `tests/studio/test_backend_ci_parallel_isolation.py`: the command scan's expected counts go from 15 parallel runs / 10 repo-root shards to 16 / 11, as its message asks when a shard is added. ## Why that split Measured locally on main with the shard's exact command (`-n 4 --dist loadgroup`): 275 passed in 1302.83 s. Of the 40 slowest tests (2815 worker-seconds), 2716 s are in `tests/test_tp_[!n]*gloo*.py`; out of about 5200 worker-seconds in total, so these 12 files are well over half of the shard. Each half now has room under the cap on a slower runner. ## Testing - `tests/test_ci_repo_cpu_shards.py` (every repo test file collected by exactly one shard, every glob matches a file): 15 passed. - All 15 test files that read `studio-backend-ci.yml`: 341 passed, 3 skipped. - The new shard's first run on this PR is the timing check.
Summary
Two repo-wide reds on
main, both from test files added in the last few merges:tests/test_ci_repo_cpu_shards.py::TestEveryTestFileLandsInExactlyOneShard::test_no_file_is_dropped_or_run_twice(Repo tests (CPU, rest)):tests/test_tokenizer_save_ddp_gloo.py. No shard collects it:glootakestest_[!fpt]*gloo*, andrestignorestest_[!f]*gloo*. It never runs in CI.tests/test_ddp_push_rank0_gloo.py. Bothgloo(test_[!fpt]*gloo*) andrest-2(test_[dimsu]*.py) collect it, so it runs twice, and inrest-2without the gloo shard's setup.tests/test_source_read_encoding.py::test_checked_in_file_reads_name_an_encoding(Repo tests (CPU, rest-2)): DDP: VLM tower sync, Gemma 4 tower LoRA and DPO ref adapter default to find_unused False, bind cuda:LOCAL_RANK at import #17867'stests/test_bind_local_cuda_device.py:47readsunsloth/__init__.pywithread_text()and no encoding.Both new files are correct tests. They only needed a shard home and an explicit encoding.
Changes
.github/workflows/studio-backend-ci.yml:gloogainstests/test_t[!p]*gloo*.py, which coverstest_tokenizer_*.test_tp_*keeps its existing split betweenglooandgloo-tp.rest-2gains--ignore-glob=tests/test_[dimsu]*gloo*.py, so a gloo file starting with d/i/m/s/u runs only ingloo.test_t[!p]*as an unclaimed name is updated.tests/test_bind_local_cuda_device.py:read_text(encoding = "utf-8").Verification
tests/test_ci_repo_cpu_shards.py tests/test_source_read_encoding.py tests/test_bind_local_cuda_device.py: 38 passed. Removing either workflow line brings back the matching failure: