-
Notifications
You must be signed in to change notification settings - Fork 10
Conversation
tests/models_core/test_magic_wand.py
Outdated
@@ -6,6 +6,7 @@ | |||
Run `pytest tests/models/test_compressed.py`. |
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?
@@ -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 comment
The reason will be displayed to describe this comment to others. Learn more.
should you also gc.collect()
the sparse_model
down below too?
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.
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 comment
The 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 comment
The 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 comment
The reason will be displayed to describe this comment to others. Learn more.
yep
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.
thanks
@@ -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 comment
The 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.
…almagic/nm-vllm into fix-failing-magic-wand-test
The But can try it there... |
SUMMARY: * Fix https://app.asana.com/0/1206976017967941/1207600124500657 * Issue was that we were not tearing down the model fully before initializing a new vllm instance. Calling `gc.collect()` seems to force this to happen
SUMMARY:
gc.collect()
seems to force this to happen