[Deprecation] Remove scheduled deprecated items (#60923)
Signed-off-by: yewentao256 <zhyanwentao@126.com>
This commit is contained in:
@@ -39,10 +39,6 @@ fn invalid_query(error: QueryRejection) -> ApiError {
|
||||
ApiError::invalid_request(error.body_text(), Some("mode"))
|
||||
}
|
||||
|
||||
// TODO: the Python frontend also accepts the deprecated
|
||||
// `wait_for_inflight_requests` flag (equivalent to `mode="wait"`); it is
|
||||
// intentionally omitted here in favor of the `mode` parameter.
|
||||
|
||||
/// Pause the scheduler so generation can be halted (e.g. for weight updates).
|
||||
pub async fn pause(
|
||||
State(state): State<Arc<AppState>>,
|
||||
|
||||
@@ -625,15 +625,7 @@ def assign_loras(requests, args):
|
||||
|
||||
def validate_args(args):
|
||||
"""Validate command-line arguments."""
|
||||
# === Deprecation and Defaulting ===
|
||||
if args.dataset is not None:
|
||||
warnings.warn(
|
||||
"The '--dataset' argument will be deprecated in the next release. "
|
||||
"Please use '--dataset-name' and '--dataset-path' instead.",
|
||||
stacklevel=2,
|
||||
)
|
||||
args.dataset_path = args.dataset
|
||||
|
||||
# === Defaulting ===
|
||||
if not getattr(args, "tokenizer", None):
|
||||
args.tokenizer = args.model
|
||||
|
||||
@@ -647,11 +639,7 @@ def validate_args(args):
|
||||
raise ValueError("--prequeue-requests is not supported with --async-engine")
|
||||
|
||||
# === Dataset Configuration ===
|
||||
if (
|
||||
not args.dataset
|
||||
and not args.dataset_path
|
||||
and args.dataset_name not in {"prefix_repetition"}
|
||||
):
|
||||
if not args.dataset_path and args.dataset_name != "prefix_repetition":
|
||||
print("When dataset path is not set, it will default to random dataset")
|
||||
args.dataset_name = "random"
|
||||
random_input_len = getattr(args, "random_input_len", None)
|
||||
@@ -809,15 +797,6 @@ def add_cli_args(parser: FlexibleArgumentParser):
|
||||
help="Name of the dataset to benchmark on.",
|
||||
default="sharegpt",
|
||||
)
|
||||
parser.add_argument(
|
||||
"--dataset",
|
||||
type=str,
|
||||
default=None,
|
||||
help="Path to the ShareGPT dataset, will be deprecated in\
|
||||
the next release. The dataset is expected to "
|
||||
"be a json in form of list[dict[..., conversations: "
|
||||
"list[dict[..., value: <prompt_or_response>]]]]",
|
||||
)
|
||||
parser.add_argument(
|
||||
"--dataset-path", type=str, default=None, help="Path to the dataset"
|
||||
)
|
||||
|
||||
@@ -224,7 +224,6 @@ class EngineClient(ABC):
|
||||
self,
|
||||
*,
|
||||
mode: "PauseMode" = "abort",
|
||||
wait_for_inflight_requests: bool = False,
|
||||
clear_cache: bool = True,
|
||||
) -> None:
|
||||
"""Pause new generation/encoding requests.
|
||||
@@ -236,7 +235,6 @@ class EngineClient(ABC):
|
||||
- ``"wait"``: Wait for in-flight requests to complete.
|
||||
- ``"keep"``: Freeze requests in queue; they resume on
|
||||
:meth:`resume_generation`.
|
||||
wait_for_inflight_requests: DEPRECATED. Use ``mode="wait"`` instead.
|
||||
clear_cache: DEPRECATED. Whether to clear KV and prefix caches
|
||||
after draining.
|
||||
|
||||
|
||||
@@ -4,7 +4,6 @@ from collections.abc import Sequence
|
||||
from typing import Any
|
||||
|
||||
from vllm import PoolingParams, PoolingRequestOutput
|
||||
from vllm.logger import init_logger
|
||||
from vllm.plugins.io_processors import get_io_processor
|
||||
from vllm.renderers.inputs.preprocess import parse_model_prompt, prompt_to_seq
|
||||
|
||||
@@ -21,8 +20,6 @@ from ..typing import (
|
||||
)
|
||||
from .protocol import IOProcessorRequest, IOProcessorResponse
|
||||
|
||||
logger = init_logger(__name__)
|
||||
|
||||
|
||||
class UnsupportedCombinedTaskIOProcessor(PoolingIOProcessor):
|
||||
name = "embed&token_classify"
|
||||
@@ -117,23 +114,7 @@ class PluginWithIOProcessorPlugins(PoolingIOProcessor):
|
||||
ctx.final_res_batch,
|
||||
request_id=ctx.request_id,
|
||||
)
|
||||
|
||||
if callable(
|
||||
output_to_response := getattr(self.io_processor, "output_to_response", None)
|
||||
):
|
||||
logger.warning_once(
|
||||
"`IOProcessor.output_to_response` is deprecated. To ensure "
|
||||
"consistency between offline and online APIs, "
|
||||
"`IOProcessorResponse` will become a transparent wrapper "
|
||||
"around output data from v0.19 onwards.",
|
||||
)
|
||||
|
||||
if hasattr(output, "request_id") and output.request_id is None:
|
||||
output.request_id = ctx.request_id # type: ignore
|
||||
|
||||
ctx.response = output_to_response(output) # type: ignore
|
||||
else:
|
||||
ctx.response = IOProcessorResponse(request_id=ctx.request_id, data=output)
|
||||
ctx.response = IOProcessorResponse(request_id=ctx.request_id, data=output)
|
||||
|
||||
#######################################
|
||||
# offline APIs
|
||||
|
||||
@@ -32,7 +32,6 @@ router = APIRouter()
|
||||
async def pause_generation(
|
||||
raw_request: Request,
|
||||
mode: Annotated[PauseMode, Query()] = "abort",
|
||||
wait_for_inflight_requests: bool = Query(False),
|
||||
clear_cache: Annotated[bool, Query()] = True,
|
||||
) -> JSONResponse:
|
||||
"""Pause generation requests to allow weight updates.
|
||||
@@ -44,7 +43,6 @@ async def pause_generation(
|
||||
- ``"abort"``: Abort all in-flight requests immediately (default).
|
||||
- ``"wait"``: Wait for in-flight requests to complete.
|
||||
- ``"keep"``: Freeze requests in queue; they resume on /resume.
|
||||
wait_for_inflight_requests: DEPRECATED. Use ``mode="wait"`` instead.
|
||||
clear_cache: DEPRECATED. Whether to clear KV/prefix caches after
|
||||
draining. Ignored when mode="keep".
|
||||
|
||||
@@ -55,7 +53,6 @@ async def pause_generation(
|
||||
await engine.pause_generation(
|
||||
mode=mode,
|
||||
clear_cache=clear_cache,
|
||||
wait_for_inflight_requests=wait_for_inflight_requests,
|
||||
)
|
||||
return JSONResponse(
|
||||
content={"status": "paused"},
|
||||
|
||||
@@ -1,17 +0,0 @@
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
# SPDX-FileCopyrightText: Copyright contributors to the vLLM project
|
||||
|
||||
from vllm.entrypoints.cli.main import main as vllm_main
|
||||
from vllm.logger import init_logger
|
||||
|
||||
logger = init_logger(__name__)
|
||||
|
||||
|
||||
# Backwards compatibility for the move from vllm.scripts to
|
||||
# vllm.entrypoints.cli.main
|
||||
def main():
|
||||
logger.warning(
|
||||
"vllm.scripts.main() is deprecated. Please re-install "
|
||||
"vllm or use vllm.entrypoints.cli.main.main() instead."
|
||||
)
|
||||
vllm_main()
|
||||
@@ -4,7 +4,6 @@ import asyncio
|
||||
import os
|
||||
import socket
|
||||
import time
|
||||
import warnings
|
||||
from collections.abc import AsyncGenerator, Iterable, Mapping
|
||||
from copy import copy
|
||||
from typing import Any
|
||||
@@ -944,7 +943,6 @@ class AsyncLLM(EngineClient):
|
||||
self,
|
||||
*,
|
||||
mode: PauseMode = "abort",
|
||||
wait_for_inflight_requests: bool | None = None,
|
||||
clear_cache: bool = True,
|
||||
) -> None:
|
||||
"""Pause generation to allow model weight updates.
|
||||
@@ -960,20 +958,10 @@ class AsyncLLM(EngineClient):
|
||||
- ``"wait"``: Wait for in-flight requests to complete.
|
||||
- ``"keep"``: Freeze requests in queue; they resume on
|
||||
:meth:`resume_generation`.
|
||||
wait_for_inflight_requests: DEPRECATED: use mode argument.
|
||||
clear_cache: Whether to clear KV cache and prefix cache after
|
||||
draining. Set to ``False`` to preserve cache for faster resume.
|
||||
|
||||
"""
|
||||
if wait_for_inflight_requests:
|
||||
warnings.warn(
|
||||
"The `wait_for_inflight_requests` parameter in "
|
||||
"`AsyncLLM.pause_generation()` is deprecated. "
|
||||
"Please use `mode` argument instead.",
|
||||
DeprecationWarning,
|
||||
stacklevel=2,
|
||||
)
|
||||
mode = "wait"
|
||||
if clear_cache:
|
||||
await self.renderer.clear_mm_cache_async()
|
||||
await self.engine_core.pause_scheduler_async(mode=mode, clear_cache=clear_cache)
|
||||
|
||||
Reference in New Issue
Block a user