Skip to content

Commit

Permalink
[Bugfix] Remove deprecated @abstractproperty (vllm-project#5174)
Browse files Browse the repository at this point in the history
  • Loading branch information
zhuohan123 authored and blinkbear committed Jun 3, 2024
1 parent 50df7af commit a51bb4f
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
5 changes: 3 additions & 2 deletions vllm/core/evictor_v1.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import enum
from abc import ABC, abstractmethod, abstractproperty
from abc import ABC, abstractmethod
from typing import OrderedDict

from vllm.block import PhysicalTokenBlock
Expand Down Expand Up @@ -44,7 +44,8 @@ def remove(self, block_hash: int) -> PhysicalTokenBlock:
"""
pass

@abstractproperty
@property
@abstractmethod
def num_blocks(self) -> int:
pass

Expand Down
5 changes: 3 additions & 2 deletions vllm/core/evictor_v2.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import enum
from abc import ABC, abstractmethod, abstractproperty
from abc import ABC, abstractmethod
from typing import OrderedDict, Tuple


Expand Down Expand Up @@ -46,7 +46,8 @@ def remove(self, block_id: int):
"""Remove a given block id from the cache."""
pass

@abstractproperty
@property
@abstractmethod
def num_blocks(self) -> int:
pass

Expand Down
5 changes: 3 additions & 2 deletions vllm/lora/worker_manager.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from abc import ABC, abstractmethod, abstractproperty
from abc import ABC, abstractmethod
from contextlib import contextmanager
from typing import Any, Dict, List, Literal, Optional, Set, Type, Union

Expand Down Expand Up @@ -42,7 +42,8 @@ def dummy_lora_cache(self):
yield
self._cached_dummy_lora = False

@abstractproperty
@property
@abstractmethod
def is_enabled(self) -> bool:
...

Expand Down

0 comments on commit a51bb4f

Please sign in to comment.