[Benchmark] Remove re-exports from bench_serving.py (#19130)

This commit is contained in:
Liangsheng Yin
2026-02-21 14:30:30 -08:00
committed by GitHub
parent f158869c2c
commit 1f2da824dd
16 changed files with 28 additions and 69 deletions

View File

@@ -23,13 +23,8 @@ from typing import Dict, List, Optional
import numpy as np
from sglang.bench_serving import (
DatasetRow,
get_dataset,
get_tokenizer,
sample_random_requests,
set_ulimit,
)
from sglang.benchmark.datasets import DatasetRow, get_dataset, sample_random_requests
from sglang.benchmark.utils import get_tokenizer, set_ulimit
from sglang.lang.backend.runtime_endpoint import Runtime
from sglang.srt.entrypoints.engine import Engine
from sglang.srt.server_args import ServerArgs

View File

@@ -36,39 +36,15 @@ import requests
from tqdm.asyncio import tqdm
from transformers import AutoTokenizer, PreTrainedTokenizerBase
from sglang.benchmark.datasets import ( # noqa: F401
ASSISTANT_SUFFIX,
MOONCAKE_DATASET_URL,
SHAREGPT_FILENAME,
SHAREGPT_REPO_ID,
from sglang.benchmark.datasets import (
DatasetRow,
compute_random_lens,
create_mm_data_row,
gen_mm_prompt,
gen_prompt,
get_available_tokens,
get_dataset,
get_gen_prefix_cache_path,
get_mooncake_request_over_time,
parse_image_resolution,
sample_custom_requests,
sample_generated_shared_prefix_requests,
sample_image_requests,
sample_mmmu_requests,
sample_openai_requests,
sample_random_requests,
sample_sharegpt_requests,
)
from sglang.benchmark.utils import ( # noqa: F401
download_and_cache_file,
download_and_cache_hf_file,
get_model,
get_processor,
from sglang.benchmark.utils import (
get_tokenizer,
is_file_valid_json,
parse_custom_headers,
remove_prefix,
remove_suffix,
set_ulimit,
)

View File

@@ -16,11 +16,8 @@ from pydantic import BaseModel
from tabulate import tabulate
from transformers import AutoProcessor, PreTrainedTokenizer
from sglang.bench_serving import (
get_dataset,
get_processor,
get_tokenizer,
)
from sglang.benchmark.datasets import get_dataset
from sglang.benchmark.utils import get_processor, get_tokenizer
from sglang.profiler import run_profile
from sglang.srt.entrypoints.http_server import launch_server
from sglang.srt.server_args import ServerArgs

View File

@@ -5,12 +5,9 @@ import time
import aiohttp
import requests
from sglang.bench_serving import (
RequestFuncOutput,
get_tokenizer,
remove_prefix,
sample_random_requests,
)
from sglang.bench_serving import RequestFuncOutput
from sglang.benchmark.datasets import sample_random_requests
from sglang.benchmark.utils import get_tokenizer, remove_prefix
AIOHTTP_TIMEOUT = aiohttp.ClientTimeout(total=20 * 60 * 60)