[Build] Cython compilation support fix (#14296)
Signed-off-by: Gregory Shtrasberg <Gregory.Shtrasberg@amd.com>
This commit is contained in:
@@ -1249,7 +1249,7 @@ class LLMEngine:
|
||||
return None
|
||||
|
||||
def _advance_to_next_step(
|
||||
self, output: List[SamplerOutput],
|
||||
self, output: SamplerOutput,
|
||||
seq_group_metadata_list: List[SequenceGroupMetadata],
|
||||
scheduled_seq_groups: List[ScheduledSequenceGroup]) -> None:
|
||||
"""Given model output from a single run, append the tokens to the
|
||||
|
||||
@@ -1187,7 +1187,8 @@ def _build_sampler_output(
|
||||
deferred_sample_results_args=deferred_sample_results_args)
|
||||
|
||||
|
||||
def _get_next_prompt_tokens(seq_group: SequenceGroupToSample) -> List[int]:
|
||||
def _get_next_prompt_tokens(
|
||||
seq_group: SequenceGroupToSample) -> tuple[int, ...]:
|
||||
"""Get a list of next prompt tokens to compute logprob from a
|
||||
given sequence group.
|
||||
|
||||
|
||||
+3
-3
@@ -37,7 +37,7 @@ from collections.abc import (AsyncGenerator, Awaitable, Generator, Hashable,
|
||||
from dataclasses import dataclass, field
|
||||
from functools import cache, lru_cache, partial, wraps
|
||||
from typing import (TYPE_CHECKING, Any, Callable, Generic, Literal, NamedTuple,
|
||||
Optional, TypeVar, Union)
|
||||
Optional, Type, TypeVar, Union)
|
||||
from uuid import uuid4
|
||||
|
||||
import cloudpickle
|
||||
@@ -1544,9 +1544,9 @@ class LazyDict(Mapping[str, T], Generic[T]):
|
||||
return len(self._factory)
|
||||
|
||||
|
||||
class ClassRegistry(UserDict[type[T], _V]):
|
||||
class ClassRegistry(UserDict[Type[T], _V]):
|
||||
|
||||
def __getitem__(self, key: type[T]) -> _V:
|
||||
def __getitem__(self, key: Type[T]) -> _V:
|
||||
for cls in key.mro():
|
||||
if cls in self.data:
|
||||
return self.data[cls]
|
||||
|
||||
Reference in New Issue
Block a user