-
Notifications
You must be signed in to change notification settings - Fork 175
Expand file tree
/
Copy pathbase.py
More file actions
42 lines (32 loc) · 1022 Bytes
/
base.py
File metadata and controls
42 lines (32 loc) · 1022 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
from dataclasses import dataclass
from typing import override
from ai.backend.common.data.permission.types import EntityType
from ai.backend.manager.actions.action import BaseAction, BaseBatchAction
from ai.backend.manager.actions.action.single_entity import (
BaseSingleEntityAction,
BaseSingleEntityActionResult,
)
from ai.backend.manager.actions.action.types import FieldData
@dataclass
class ImageAction(BaseAction):
@override
@classmethod
def entity_type(cls) -> EntityType:
return EntityType.IMAGE
@dataclass
class ImageBatchAction(BaseBatchAction):
@override
@classmethod
def entity_type(cls) -> EntityType:
return EntityType.IMAGE
@dataclass
class ImageSingleEntityAction(BaseSingleEntityAction):
@override
@classmethod
def entity_type(cls) -> EntityType:
return EntityType.IMAGE
@override
def field_data(self) -> FieldData | None:
return None
class ImageSingleEntityActionResult(BaseSingleEntityActionResult):
pass