[CI] cpu ci init + lint#5
Merged
Merged
Conversation
Collaborator
Author
|
/run-lint |
cbd0c94 to
35516a8
Compare
Port the AST-discovered test framework, reusable workflow, pre-commit config, and seed tests from the miles main repo, trimmed to CPU-only. Framework (tests/ci/, direct copy): - ci_register.py / ci_utils.py / run_suite.py — AST-parsed register_cpu_ci markers + LPT partitioning + pytest invocation - cpu_stubs/sgl_kernel — MagicMock stub so sglang's import chain succeeds on ubuntu-latest where sgl_kernel (GPU-only) cannot install Adaptations for miles-D (vs miles main): - labels.py: rewritten KNOWN_LABELS for miles-D domains - run_suite.py: PER_COMMIT_SUITES[HWBackend.CUDA] = [] (no GPU runners) - _run-ci.yml: stripped GPU run: job + Megatron checkout/install - pr-test.yml: removed all GPU stages - .pre-commit-config.yaml: dropped ban-mpu-get local hook; added exclude: ^flow_grpo/ on all 4 formatter hooks - pyproject.toml: asyncio_mode = "auto" + ruff extend-exclude flow_grpo Seed test: - tests/fast/utils/test_misc.py exercises FunctionRegistry, load_function, and should_run_periodic_action Support helper: - miles/utils/misc.py: add FunctionRegistry class used by the seed test for registering callables under test names requirements.txt: add pytest + pytest-asyncio for the test runner. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Pure lint output from pre-commit on upstream/main miles/ files. Hooks applied: ruff (E/F/B/UP with --unsafe-fixes for the 6 F841 cases), autoflake, isort (black profile), black (line-length=119). Plus 2 manual fixes that ruff flagged but couldn't auto-resolve: - qwen_image.py B023: bound `theta` via default arg `theta: float = theta` on the closure `_params` to capture the current loop iteration value - qwen_image.py B007: renamed unused loop var `L` to `_L` Plus 1 manual fix for local py3.9 / py3.10 black gap: - loss.py: added blank line after import block (CI py3.10 black would apply this; local py3.9 black --safe can't parse the match-case at line 824 and skips the file) flow_grpo/ excluded by all formatter hooks (see preceding ci commit). Verified pre-commit run --all-files is now idempotent (0 modifications on a second run). Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
e7dada9 to
a255158
Compare
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.
basic CPU ci + lint