@tduncan / Nvidia-Optimization-Stack-VLLM Mirror · read-only / commits / 8279078e21
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 17, 00:30 UTC

[Bugfix] Remove deprecated @abstractproperty (#5174)

Zhuohan Li committed Jun 1, 2024 at 15:40 UTC 8279078e218833b357f7c5076850e3688714d570
3 files changed +9 -6
vllm/core/evictor_v1.py
+3 -2
@@ -1,5 +1,5 @@
1 import enum
2 -from abc import ABC, abstractmethod, abstractproperty
2 +from abc import ABC, abstractmethod
3 from typing import OrderedDict
4
5 from vllm.block import PhysicalTokenBlock
@@ -44,7 +44,8 @@ class Evictor(ABC):
44 """
45 pass
46
47 - @abstractproperty
47 + @property
48 + @abstractmethod
49 def num_blocks(self) -> int:
50 pass
51
vllm/core/evictor_v2.py
+3 -2
@@ -1,5 +1,5 @@
1 import enum
2 -from abc import ABC, abstractmethod, abstractproperty
2 +from abc import ABC, abstractmethod
3 from typing import OrderedDict, Tuple
4
5
@@ -46,7 +46,8 @@ class Evictor(ABC):
46 """Remove a given block id from the cache."""
47 pass
48
49 - @abstractproperty
49 + @property
50 + @abstractmethod
51 def num_blocks(self) -> int:
52 pass
53
vllm/lora/worker_manager.py
+3 -2
@@ -1,4 +1,4 @@
1 -from abc import ABC, abstractmethod, abstractproperty
1 +from abc import ABC, abstractmethod
2 from contextlib import contextmanager
3 from typing import Any, Dict, List, Literal, Optional, Set, Type, Union
4
@@ -42,7 +42,8 @@ class AbstractWorkerLoRAManager(ABC):
42 yield
43 self._cached_dummy_lora = False
44
45 - @abstractproperty
45 + @property
46 + @abstractmethod
47 def is_enabled(self) -> bool:
48 ...
49