@tduncan / Nvidia-Optimization-Stack-VLLM Mirror · read-only / commits / e97c46a92d
Fork 0

A high-throughput and memory-efficient inference and serving engine for LLMs

Mirrored from https://github.com/tduncan-lum/Nvidia-Optimization-Stack---VLLM.git

Synced Nov 7, 22:45 UTC

[BugFix]: Fix local mypy issues (#34739)

Signed-off-by: Martin Hickey <martin.hickey@ie.ibm.com> Co-authored-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>

Martin Hickey committed Feb 23, 2026 at 08:40 UTC e97c46a92ded70813806fd6f33cf8bd9fcf005bc
6 files changed +12 -6
vllm/distributed/kv_transfer/kv_connector/v1/nixl_connector.py
+4
@@ -935,6 +935,10 @@ class NixlConnectorWorker:
935 ]
936
937 if rsv_cores_for_kv:
938 + if not hasattr(os, "sched_setaffinity"):
939 + raise NotImplementedError(
940 + "os.sched_setaffinity is not available on this platform"
941 + )
942 os.sched_setaffinity(0, rsv_cores_for_kv)
943
944 # support for oot platform which can't register nixl memory
vllm/entrypoints/openai/chat_completion/protocol.py
+1 -1
@@ -5,7 +5,6 @@
5 # https://github.com/lm-sys/FastChat/blob/168ccc29d3f7edc50823016105c024fe2282732a/fastchat/protocol/openai_api_protocol.py
6 import json
7 import time
8 -from dataclasses import replace
8 from typing import Annotated, Any, ClassVar, Literal
9
10 import torch
@@ -16,6 +15,7 @@ from openai.types.chat.chat_completion_message import Annotation as OpenAIAnnota
15 from pydantic import Field, model_validator
16
17 from vllm.config import ModelConfig
18 +from vllm.config.utils import replace
19 from vllm.entrypoints.chat_utils import (
20 ChatCompletionMessageParam,
21 ChatTemplateContentFormatOption,
vllm/entrypoints/openai/completion/protocol.py
+1 -1
@@ -5,13 +5,13 @@
5 # https://github.com/lm-sys/FastChat/blob/168ccc29d3f7edc50823016105c024fe2282732a/fastchat/protocol/openai_api_protocol.py
6 import json
7 import time
8 -from dataclasses import replace
8 from typing import Annotated, Any, Literal
9
10 import torch
11 from pydantic import Field, model_validator
12
13 from vllm.config import ModelConfig
14 +from vllm.config.utils import replace
15 from vllm.entrypoints.openai.engine.protocol import (
16 AnyResponseFormat,
17 LegacyStructuralTagResponseFormat,
vllm/entrypoints/openai/responses/protocol.py
+3 -1
@@ -337,7 +337,9 @@ class ResponsesRequest(OpenAIBaseModel):
337 and response_format.schema_ is not None
338 ):
339 structured_outputs = StructuredOutputsParams(
340 - json=response_format.schema_
340 + json=response_format.schema_ # type: ignore[call-arg]
341 + # --follow-imports skip hides the class definition but also hides
342 + # multiple third party conflicts, so best of both evils
343 )
344
345 stop = self.stop if self.stop else []
vllm/entrypoints/openai/responses/serving.py
+1 -1
@@ -8,7 +8,6 @@ from collections import deque
8 from collections.abc import AsyncGenerator, AsyncIterator, Callable, Sequence
9 from contextlib import AsyncExitStack
10 from copy import copy
11 -from dataclasses import replace
11 from http import HTTPStatus
12 from typing import Final
13
@@ -40,6 +39,7 @@ from openai_harmony import Message as OpenAIHarmonyMessage
39 from pydantic import TypeAdapter
40
41 from vllm import envs
42 +from vllm.config.utils import replace
43 from vllm.engine.protocol import EngineClient
44 from vllm.entrypoints.chat_utils import (
45 ChatCompletionMessageParam,
vllm/sampling_params.py
+2 -2
@@ -3,7 +3,7 @@
3 """Sampling parameters for text generation."""
4
5 import copy
6 -import json
6 +import json as json_mod
7 from dataclasses import field
8 from enum import Enum, IntEnum
9 from functools import cached_property
@@ -791,7 +791,7 @@ class SamplingParams(
791 skip_guidance = False
792 if so_params.json:
793 if isinstance(so_params.json, str):
794 - schema = json.loads(so_params.json)
794 + schema = json_mod.loads(so_params.json)
795 else:
796 schema = so_params.json
797 skip_guidance = has_guidance_unsupported_json_features(schema)