Skip to content

[CI] cpu ci init + lint#5

Merged
Rockdu merged 2 commits into
radixark:mainfrom
Rockdu:feat/cpu-ci-bootstrap
Jun 10, 2026
Merged

[CI] cpu ci init + lint#5
Rockdu merged 2 commits into
radixark:mainfrom
Rockdu:feat/cpu-ci-bootstrap

Conversation

@Rockdu

@Rockdu Rockdu commented Jun 4, 2026

Copy link
Copy Markdown
Collaborator

basic CPU ci + lint

@Rockdu

Rockdu commented Jun 4, 2026

Copy link
Copy Markdown
Collaborator Author

/run-lint

@Rockdu Rockdu requested a review from guapisolo as a code owner June 4, 2026 07:50
@Rockdu Rockdu force-pushed the feat/cpu-ci-bootstrap branch 3 times, most recently from cbd0c94 to 35516a8 Compare June 10, 2026 06:19
Rockdu and others added 2 commits June 9, 2026 23:47
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>
@Rockdu Rockdu force-pushed the feat/cpu-ci-bootstrap branch from e7dada9 to a255158 Compare June 10, 2026 06:50
@Rockdu Rockdu changed the title Feat/cpu ci bootstrap [CI] cpu ci init Jun 10, 2026
@Rockdu Rockdu changed the title [CI] cpu ci init [CI] cpu ci init + lint Jun 10, 2026
@Rockdu Rockdu merged commit 4143a26 into radixark:main Jun 10, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant