Skip to content

Fix LoRA fixture cleanup without Ray - #9

Closed
chinazhangchao wants to merge 1 commit into
win_rebase/v0.33.0from
chao/fix_lora_cleanup
Closed

chinazhangchao wants to merge 1 commit into
win_rebase/v0.33.0from
chao/fix_lora_cleanup

Conversation

@chinazhangchao

@chinazhangchao chinazhangchao commented Nov 18, 2026 •

Copy link
Copy Markdown
Collaborator

This pull request updates the test cleanup logic in tests/lora/conftest.py to more robustly determine whether Ray should be shut down after tests. Instead of always attempting to shut down Ray, the code now checks if Ray is actually initialized before shutting it down, which helps avoid unnecessary shutdown calls and potential errors.

Test infrastructure improvements:

  • Updated the cleanup_dist_env_and_memory calls in both the cleanup_fixture and dist_init functions to use the new is_ray_initialized() utility, ensuring Ray is only shut down if it has been started. [1] [2]
  • Imported the is_ray_initialized function from vllm.ray.lazy_utils to support the new conditional shutdown logic.

Build pipeline:
https://github.com/vortex-captain/ci-infra/actions/runs/44050289294
Test pipeline:
https://github.com/vortex-captain/ci-infra/actions/runs/44212174833/job/134500228031

Only request Ray shutdown when it is initialized, so LoRA teardown also works in environments where Ray is not installed.

Signed-off-by: Chao Zhang <zhangchao@microsoft.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@chinazhangchao
chinazhangchao deleted the chao/fix_lora_cleanup branch November 18, 2026 08:08
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