Skip to content

[multi-lora] 1/n - 2, ci: verify import targets in the source-resolution harness step - #2725

Open
yushengsu-thu wants to merge 2 commits into
mainfrom
split/1n-2-import-integrity
Open

[multi-lora] 1/n - 2, ci: verify import targets in the source-resolution harness step#2725
yushengsu-thu wants to merge 2 commits into
mainfrom
split/1n-2-import-integrity

Conversation

@yushengsu-thu

@yushengsu-thu yushengsu-thu commented Aug 23, 2026

Copy link
Copy Markdown
Collaborator

Extends tests/ci/verify_source_resolution.py — the pre-test step every CPU and GPU CI job already runs — with import-integrity checks: statically resolve every miles-internal import site (module-level, function-local, and relative) across miles/ and examples/ against the source tree, walk the optional multi-lora namespaces in full when present (absent packages skip cleanly on main), and import the update_weight/ lazy-import targets. Failures raise RuntimeError with the offending file:line and import target; missing non-miles optional deps stay tolerated.

Running this in the harness step instead of a fast test covers every job (CPU and GPU) before pytest even starts, which is broader than the fast suite. Born from the mixin.py dead lazy-import incident, where a moved module was only referenced from a function-local import and nothing failed until runtime.

Extracted from #2273; the stack rebases after this merges.

Statically resolves every miles-internal import site (including
function-local ones) against the tree and imports all modules of
optional namespaces when they are present, so moved or deleted modules
fail fast in CPU CI instead of at runtime.

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Claude Code Review

This repository is configured for manual code reviews. Comment @claude review for a one-time review, or @claude review always to subscribe this PR to a review on every future push.

Tip: disable this comment in your organization's Code Review settings.

@yushengsu-thu yushengsu-thu added run-ci-megatron run-ci-lora run-ci-lora-native Run native (raw-mode) LoRA plugin e2e tests labels Aug 24, 2026
Move the import-integrity checks out of the fast suite and into
tests/ci/verify_source_resolution.py, which every CPU and GPU CI job
runs before pytest: statically resolve every miles-internal import
site (including function-local ones) across miles/ and examples/,
walk the optional namespaces in full when present, and import the
update_weight lazy-import targets. Failures raise RuntimeError with
the offending file:line and import target.
@yushengsu-thu yushengsu-thu changed the title [multi-lora] 1/n - 2, test: import-integrity meta test [multi-lora] 1/n - 2, ci: verify import targets in the source-resolution harness step Aug 24, 2026
@guapisolo guapisolo removed run-ci-megatron run-ci-lora run-ci-lora-native Run native (raw-mode) LoRA plugin e2e tests labels Aug 24, 2026
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.

2 participants