Skip to content
This repository was archived by the owner on Oct 11, 2024. It is now read-only.

Commit 1ad0b34

Browse files
[ CI ] Fix Failing Magic Wand Test (#311)
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
1 parent dccf320 commit 1ad0b34

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

tests/models_core/test_magic_wand.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,11 @@
33
As a result, in this test, we just confirm that the top selected tokens of the
44
sparse models are in the top N selections of same model running dense.
55
6-
Run `pytest tests/models/test_compressed.py`.
6+
Run `pytest tests/models_core/test_magic_wand.py`.
77
"""
88

9+
import gc
10+
911
import pytest
1012

1113
from tests.models.utils import check_logprobs_close
@@ -47,6 +49,7 @@ def test_magic_wand(
4749
dense_outputs = dense_model.generate_greedy_logprobs(
4850
example_prompts, max_tokens, num_logprobs)
4951
del dense_model
52+
gc.collect()
5053

5154
sparse_model = vllm_runner(
5255
model_name=model_name,

0 commit comments

Comments
 (0)