Commit 7217766
authored
[CI][UT] Fix NetLoader fallback mock binding (vllm-project#11604)
### What this PR does / why we need it?
This PR fixes the NetLoader failure-path UT by patching
`ModelNetLoaderElastic.revert_to_default` on the class instead of
patching a module-level symbol. The production code calls
`self.revert_to_default(...)`, so patching the method keeps the mocked
fallback bound correctly during the test.
### Does this PR introduce _any_ user-facing change?
No. This is a unit test fix only.
### How was this patch tested?
- Stubbed local pytest for this mocked CPU UT passed: `12 passed`.
- `bash format.sh ci` passed ruff, ruff format, codespell, typos,
clang-format, markdownlint, workflow lint, PNG export lint, filename
spacing, package init, forbidden logger/import checks, boolean-op check,
long-function-comment check, and suggestion check. The shellcheck hook
reported an existing issue in unmodified `csrc/build.sh:524`, unrelated
to this PR.
- vLLM version: v0.23.0
- vLLM main:
vllm-project/vllm@1f486d9
Signed-off-by: freyfwt <freytian1996@gmail.com>1 parent 1bf2a35 commit 7217766
1 file changed
Lines changed: 3 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
281 | 281 | | |
282 | 282 | | |
283 | 283 | | |
284 | | - | |
285 | | - | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
286 | 287 | | |
287 | 288 | | |
288 | 289 | | |
| |||
0 commit comments