-
Notifications
You must be signed in to change notification settings - Fork 10
[ CI ] Fix Failing Magic Wand Test #311
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,6 +6,7 @@ | |
Run `pytest tests/models/test_compressed.py`. | ||
""" | ||
|
||
import gc | ||
import pytest | ||
|
||
from tests.models.utils import check_logprobs_close | ||
|
@@ -47,6 +48,7 @@ def test_magic_wand( | |
dense_outputs = dense_model.generate_greedy_logprobs( | ||
example_prompts, max_tokens, num_logprobs) | ||
del dense_model | ||
gc.collect() | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. should you also There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Script is over by then, so not needed. We just need to make sure the dense model is cleaned up before we start the sparse model There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. approved, but wondering if we should try to encapsulate cleanup in a helper function. even if "gc.collect()" isn't always needed it might be good practice. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. what about for the next test, though? are we guaranteed that everything is cleaned up by then? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yep |
||
|
||
sparse_model = vllm_runner( | ||
model_name=model_name, | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could you fix this doc line while you're in here?