mirror of
https://github.com/PaddlePaddle/FastDeploy.git
synced 2025-10-05 16:48:03 +08:00
polish code with new pre-commit rule (#2923)
This commit is contained in:
@@ -24,6 +24,7 @@ from dataclasses import dataclass
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
import paddle
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from fastdeploy.model_executor.forward_meta import ForwardMeta
|
||||
|
||||
@@ -39,7 +40,7 @@ class AttentionBackend(ABC):
|
||||
@abstractmethod
|
||||
def init_attention_metadata(self, forward_meta: ForwardMeta):
|
||||
"""Initialize the forward metadata."""
|
||||
raise NotImplementedError()
|
||||
raise NotImplementedError
|
||||
|
||||
def forward(
|
||||
self,
|
||||
@@ -109,7 +110,7 @@ class AttentionBackend(ABC):
|
||||
forward_meta: ForwardMeta,
|
||||
) -> paddle.Tensor:
|
||||
"""Run a forward for mix."""
|
||||
raise NotImplementedError()
|
||||
raise NotImplementedError
|
||||
|
||||
def forward_decode(
|
||||
self,
|
||||
@@ -123,7 +124,7 @@ class AttentionBackend(ABC):
|
||||
forward_meta: ForwardMeta,
|
||||
) -> paddle.Tensor:
|
||||
"""Run a forward for decode."""
|
||||
raise NotImplementedError()
|
||||
raise NotImplementedError
|
||||
|
||||
def forward_extend(
|
||||
self,
|
||||
@@ -137,4 +138,4 @@ class AttentionBackend(ABC):
|
||||
forward_meta: ForwardMeta,
|
||||
) -> paddle.Tensor:
|
||||
"""Run a forward for extend."""
|
||||
raise NotImplementedError()
|
||||
raise NotImplementedError
|
||||
|
Reference in New Issue
Block a user