Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
OpenDAS
vllm_cscc
Commits
8279078e
Unverified
Commit
8279078e
authored
Jun 01, 2024
by
Zhuohan Li
Committed by
GitHub
Jun 01, 2024
Browse files
[Bugfix] Remove deprecated @abstractproperty (#5174)
parent
b9c0605a
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
6 deletions
+9
-6
vllm/core/evictor_v1.py
vllm/core/evictor_v1.py
+3
-2
vllm/core/evictor_v2.py
vllm/core/evictor_v2.py
+3
-2
vllm/lora/worker_manager.py
vllm/lora/worker_manager.py
+3
-2
No files found.
vllm/core/evictor_v1.py
View file @
8279078e
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
...
...
vllm/core/evictor_v2.py
View file @
8279078e
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
...
...
vllm/lora/worker_manager.py
View file @
8279078e
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
:
...
...
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment