conftest.py 589 Bytes
Newer Older
1
# SPDX-License-Identifier: Apache-2.0
2
3
import pytest

4
from vllm.distributed import cleanup_dist_env_and_memory
5
6
7
from vllm.model_executor.model_loader.tensorizer import TensorizerConfig


8
9
10
11
12
13
14
15
@pytest.fixture(scope="function", autouse=True)
def use_v0_only(monkeypatch):
    """
    Tensorizer only tested on V0 so far.
    """
    monkeypatch.setenv('VLLM_USE_V1', '0')


16
@pytest.fixture(autouse=True)
17
def cleanup():
18
    cleanup_dist_env_and_memory(shutdown_ray=True)
19
20
21
22
23


@pytest.fixture(autouse=True)
def tensorizer_config():
    config = TensorizerConfig(tensorizer_uri="vllm")
24
    return config