[Platform] Deprecate seed_everything (#31659)
Signed-off-by: wangxiyuan <wangxiyuan1007@gmail.com>
This commit is contained in:
@@ -9,6 +9,7 @@ from vllm._custom_ops import (
|
||||
apply_repetition_penalties_torch,
|
||||
)
|
||||
from vllm.platforms import current_platform
|
||||
from vllm.utils.torch_utils import set_random_seed
|
||||
|
||||
NUM_SEQS = [1, 2, 3, 4, 8, 13, 17, 32, 37, 256, 1023, 1024, 1025]
|
||||
# [stress, stress, stress, Qwen, llama 4]
|
||||
@@ -38,7 +39,7 @@ def test_apply_repetition_penalties(
|
||||
Test the apply_repetition_penalties custom op
|
||||
against a reference implementation.
|
||||
"""
|
||||
current_platform.seed_everything(seed)
|
||||
set_random_seed(seed)
|
||||
torch.set_default_device("cuda:0")
|
||||
|
||||
# Create test data
|
||||
@@ -95,7 +96,7 @@ def test_apply_repetition_penalties_zero_seqs() -> None:
|
||||
dtype = torch.float32
|
||||
seed = 0
|
||||
|
||||
current_platform.seed_everything(seed)
|
||||
set_random_seed(seed)
|
||||
torch.set_default_device("cuda:0")
|
||||
|
||||
# Create test data
|
||||
|
||||
Reference in New Issue
Block a user