Unverified Commit 8279078e authored by Zhuohan Li's avatar Zhuohan Li Committed by GitHub
Browse files

[Bugfix] Remove deprecated @abstractproperty (#5174)

parent b9c0605a
import enum import enum
from abc import ABC, abstractmethod, abstractproperty from abc import ABC, abstractmethod
from typing import OrderedDict from typing import OrderedDict
from vllm.block import PhysicalTokenBlock from vllm.block import PhysicalTokenBlock
...@@ -44,7 +44,8 @@ class Evictor(ABC): ...@@ -44,7 +44,8 @@ class Evictor(ABC):
""" """
pass pass
@abstractproperty @property
@abstractmethod
def num_blocks(self) -> int: def num_blocks(self) -> int:
pass pass
......
import enum import enum
from abc import ABC, abstractmethod, abstractproperty from abc import ABC, abstractmethod
from typing import OrderedDict, Tuple from typing import OrderedDict, Tuple
...@@ -46,7 +46,8 @@ class Evictor(ABC): ...@@ -46,7 +46,8 @@ class Evictor(ABC):
"""Remove a given block id from the cache.""" """Remove a given block id from the cache."""
pass pass
@abstractproperty @property
@abstractmethod
def num_blocks(self) -> int: def num_blocks(self) -> int:
pass pass
......
from abc import ABC, abstractmethod, abstractproperty from abc import ABC, abstractmethod
from contextlib import contextmanager from contextlib import contextmanager
from typing import Any, Dict, List, Literal, Optional, Set, Type, Union from typing import Any, Dict, List, Literal, Optional, Set, Type, Union
...@@ -42,7 +42,8 @@ class AbstractWorkerLoRAManager(ABC): ...@@ -42,7 +42,8 @@ class AbstractWorkerLoRAManager(ABC):
yield yield
self._cached_dummy_lora = False self._cached_dummy_lora = False
@abstractproperty @property
@abstractmethod
def is_enabled(self) -> bool: def is_enabled(self) -> bool:
... ...
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment