superb-ai-onprem 0.5.22__py3-none-any.whl → 0.6.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of superb-ai-onprem might be problematic. Click here for more details.
- spb_onprem/__init__.py +40 -27
- spb_onprem/_version.py +2 -2
- spb_onprem/data/params/__init__.py +42 -4
- spb_onprem/data/params/data_list.py +110 -121
- spb_onprem/data/queries.py +9 -1
- spb_onprem/data/service.py +4 -1
- spb_onprem/searches.py +40 -28
- {superb_ai_onprem-0.5.22.dist-info → superb_ai_onprem-0.6.0.dist-info}/METADATA +1 -1
- {superb_ai_onprem-0.5.22.dist-info → superb_ai_onprem-0.6.0.dist-info}/RECORD +13 -13
- tests/data/test_data_service.py +1 -1
- {superb_ai_onprem-0.5.22.dist-info → superb_ai_onprem-0.6.0.dist-info}/WHEEL +0 -0
- {superb_ai_onprem-0.5.22.dist-info → superb_ai_onprem-0.6.0.dist-info}/licenses/LICENSE +0 -0
- {superb_ai_onprem-0.5.22.dist-info → superb_ai_onprem-0.6.0.dist-info}/top_level.txt +0 -0
spb_onprem/__init__.py
CHANGED
|
@@ -46,23 +46,29 @@ from .entities import (
|
|
|
46
46
|
|
|
47
47
|
# Filters
|
|
48
48
|
from .searches import (
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
DateTimeRangeFilter,
|
|
54
|
-
UserFilter,
|
|
55
|
-
StringMetaFilter,
|
|
49
|
+
DateTimeRangeFilterOption,
|
|
50
|
+
UserFilterOption,
|
|
51
|
+
NumericRangeFilter,
|
|
52
|
+
GeoLocationFilter,
|
|
56
53
|
NumberMetaFilter,
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
54
|
+
KeywordMetaFilter,
|
|
55
|
+
DateMetaFilter,
|
|
56
|
+
MiscMetaFilter,
|
|
57
|
+
MetaFilter,
|
|
58
|
+
CountFilter,
|
|
59
|
+
DistanceCountFilter,
|
|
60
|
+
FrameCountsFilter,
|
|
61
|
+
FrameFilterOptions,
|
|
62
|
+
DataFilterOptions,
|
|
63
|
+
DataSliceStatusFilterOption,
|
|
64
|
+
DataSliceUserFilterOption,
|
|
65
|
+
DataSliceTagsFilterOption,
|
|
66
|
+
DataSliceCommentFilterOption,
|
|
63
67
|
DataSlicePropertiesFilter,
|
|
64
68
|
DataSliceFilter,
|
|
65
|
-
|
|
69
|
+
FrameFilter,
|
|
70
|
+
DataFilter,
|
|
71
|
+
DataListFilter,
|
|
66
72
|
DatasetsFilter,
|
|
67
73
|
DatasetsFilterOptions,
|
|
68
74
|
SlicesFilter,
|
|
@@ -115,22 +121,29 @@ __all__ = (
|
|
|
115
121
|
"CommentStatus",
|
|
116
122
|
|
|
117
123
|
# Filters
|
|
118
|
-
"
|
|
119
|
-
"
|
|
120
|
-
"
|
|
121
|
-
"
|
|
122
|
-
"DateTimeRangeFilter",
|
|
123
|
-
"UserFilter",
|
|
124
|
-
"StringMetaFilter",
|
|
124
|
+
"DateTimeRangeFilterOption",
|
|
125
|
+
"UserFilterOption",
|
|
126
|
+
"NumericRangeFilter",
|
|
127
|
+
"GeoLocationFilter",
|
|
125
128
|
"NumberMetaFilter",
|
|
126
|
-
"
|
|
127
|
-
"
|
|
128
|
-
"
|
|
129
|
-
"
|
|
130
|
-
"
|
|
131
|
-
"
|
|
129
|
+
"KeywordMetaFilter",
|
|
130
|
+
"DateMetaFilter",
|
|
131
|
+
"MiscMetaFilter",
|
|
132
|
+
"MetaFilter",
|
|
133
|
+
"CountFilter",
|
|
134
|
+
"DistanceCountFilter",
|
|
135
|
+
"FrameCountsFilter",
|
|
136
|
+
"FrameFilterOptions",
|
|
137
|
+
"DataFilterOptions",
|
|
138
|
+
"DataSliceStatusFilterOption",
|
|
139
|
+
"DataSliceUserFilterOption",
|
|
140
|
+
"DataSliceTagsFilterOption",
|
|
141
|
+
"DataSliceCommentFilterOption",
|
|
132
142
|
"DataSlicePropertiesFilter",
|
|
133
143
|
"DataSliceFilter",
|
|
144
|
+
"FrameFilter",
|
|
145
|
+
"DataFilter",
|
|
146
|
+
"DataListFilter",
|
|
134
147
|
"DatasetsFilter",
|
|
135
148
|
"DatasetsFilterOptions",
|
|
136
149
|
"SlicesFilter",
|
spb_onprem/_version.py
CHANGED
|
@@ -28,7 +28,7 @@ version_tuple: VERSION_TUPLE
|
|
|
28
28
|
commit_id: COMMIT_ID
|
|
29
29
|
__commit_id__: COMMIT_ID
|
|
30
30
|
|
|
31
|
-
__version__ = version = '0.
|
|
32
|
-
__version_tuple__ = version_tuple = (0,
|
|
31
|
+
__version__ = version = '0.6.0'
|
|
32
|
+
__version_tuple__ = version_tuple = (0, 6, 0)
|
|
33
33
|
|
|
34
34
|
__commit_id__ = commit_id = None
|
|
@@ -10,9 +10,28 @@ from .data import (
|
|
|
10
10
|
from .data_list import (
|
|
11
11
|
get_data_id_list_params,
|
|
12
12
|
get_data_list_params,
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
DateTimeRangeFilterOption,
|
|
14
|
+
UserFilterOption,
|
|
15
|
+
NumericRangeFilter,
|
|
16
|
+
GeoLocationFilter,
|
|
17
|
+
NumberMetaFilter,
|
|
18
|
+
KeywordMetaFilter,
|
|
19
|
+
DateMetaFilter,
|
|
20
|
+
MiscMetaFilter,
|
|
21
|
+
MetaFilter,
|
|
22
|
+
CountFilter,
|
|
23
|
+
DistanceCountFilter,
|
|
24
|
+
FrameCountsFilter,
|
|
25
|
+
FrameFilterOptions,
|
|
15
26
|
DataFilterOptions,
|
|
27
|
+
DataSliceStatusFilterOption,
|
|
28
|
+
DataSliceUserFilterOption,
|
|
29
|
+
DataSliceTagsFilterOption,
|
|
30
|
+
DataSliceCommentFilterOption,
|
|
31
|
+
DataSlicePropertiesFilter,
|
|
32
|
+
DataSliceFilter,
|
|
33
|
+
FrameFilter,
|
|
34
|
+
DataFilter,
|
|
16
35
|
DataListFilter,
|
|
17
36
|
)
|
|
18
37
|
from .get_data_detail import (
|
|
@@ -81,9 +100,28 @@ __all__ = [
|
|
|
81
100
|
"get_data_list_params",
|
|
82
101
|
"get_data_detail_params",
|
|
83
102
|
"get_evaluation_value_list_params",
|
|
84
|
-
"
|
|
85
|
-
"
|
|
103
|
+
"DateTimeRangeFilterOption",
|
|
104
|
+
"UserFilterOption",
|
|
105
|
+
"NumericRangeFilter",
|
|
106
|
+
"GeoLocationFilter",
|
|
107
|
+
"NumberMetaFilter",
|
|
108
|
+
"KeywordMetaFilter",
|
|
109
|
+
"DateMetaFilter",
|
|
110
|
+
"MiscMetaFilter",
|
|
111
|
+
"MetaFilter",
|
|
112
|
+
"CountFilter",
|
|
113
|
+
"DistanceCountFilter",
|
|
114
|
+
"FrameCountsFilter",
|
|
115
|
+
"FrameFilterOptions",
|
|
86
116
|
"DataFilterOptions",
|
|
117
|
+
"DataSliceStatusFilterOption",
|
|
118
|
+
"DataSliceUserFilterOption",
|
|
119
|
+
"DataSliceTagsFilterOption",
|
|
120
|
+
"DataSliceCommentFilterOption",
|
|
121
|
+
"DataSlicePropertiesFilter",
|
|
122
|
+
"DataSliceFilter",
|
|
123
|
+
"FrameFilter",
|
|
124
|
+
"DataFilter",
|
|
87
125
|
"DataListFilter",
|
|
88
126
|
"remove_data_from_slice_params",
|
|
89
127
|
"insert_data_to_slice_params",
|
|
@@ -1,162 +1,157 @@
|
|
|
1
|
-
from typing import
|
|
2
|
-
Optional,
|
|
3
|
-
List,
|
|
4
|
-
Union,
|
|
5
|
-
Any
|
|
6
|
-
)
|
|
7
|
-
from enum import Enum
|
|
1
|
+
from typing import Optional, List, Union, Literal
|
|
8
2
|
from spb_onprem.base_model import CustomBaseModel, Field
|
|
9
3
|
from spb_onprem.data.enums import DataType, DataStatus
|
|
10
4
|
from spb_onprem.exceptions import BadParameterError
|
|
11
5
|
|
|
12
|
-
|
|
13
|
-
class
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
UNRESOLVED = "UNRESOLVED"
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
class AnnotationFilter(CustomBaseModel):
|
|
20
|
-
type: Optional[str] = None
|
|
21
|
-
name: Optional[str] = None
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
class AnnotationRangeFilter(CustomBaseModel):
|
|
25
|
-
annotation_type: Optional[str] = Field(None, alias="annotationType")
|
|
26
|
-
class_name: Optional[str] = Field(None, alias="className")
|
|
27
|
-
class_count_equals: Optional[int] = Field(None, alias="classCountEquals")
|
|
28
|
-
class_count_in: Optional[List[int]] = Field(None, alias="classCountIn")
|
|
29
|
-
class_count_max: Optional[int] = Field(None, alias="classCountMax")
|
|
30
|
-
class_count_min: Optional[int] = Field(None, alias="classCountMin")
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
class DateTimeRangeFilter(CustomBaseModel):
|
|
34
|
-
"""날짜/시간 범위 필터"""
|
|
35
|
-
from_date: Optional[str] = Field(None, alias="from")
|
|
36
|
-
to_date: Optional[str] = Field(None, alias="to")
|
|
6
|
+
# === 기본 필터 ===
|
|
7
|
+
class DateTimeRangeFilterOption(CustomBaseModel):
|
|
8
|
+
datetime_from: Optional[str] = Field(None, alias="from")
|
|
9
|
+
to: Optional[str] = None
|
|
37
10
|
equals: Optional[str] = None
|
|
38
11
|
|
|
39
|
-
|
|
40
|
-
class UserFilter(CustomBaseModel):
|
|
41
|
-
"""사용자 필터 옵션"""
|
|
12
|
+
class UserFilterOption(CustomBaseModel):
|
|
42
13
|
equals: Optional[str] = None
|
|
43
14
|
contains: Optional[str] = None
|
|
44
|
-
|
|
15
|
+
user_in: Optional[List[str]] = Field(None, alias="in")
|
|
45
16
|
exists: Optional[bool] = None
|
|
46
17
|
|
|
18
|
+
class NumericRangeFilter(CustomBaseModel):
|
|
19
|
+
gt: Optional[float] = None
|
|
20
|
+
gte: Optional[float] = None
|
|
21
|
+
lt: Optional[float] = None
|
|
22
|
+
lte: Optional[float] = None
|
|
23
|
+
equals: Optional[float] = None
|
|
47
24
|
|
|
48
|
-
class
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
equals: Optional[str] = None
|
|
53
|
-
in_list: Optional[List[str]] = Field(None, alias="in")
|
|
54
|
-
|
|
25
|
+
class GeoLocationFilter(CustomBaseModel):
|
|
26
|
+
latitude: float
|
|
27
|
+
longitude: float
|
|
28
|
+
radius_in_meters: float = Field(..., alias="radiusInMeters")
|
|
55
29
|
|
|
30
|
+
# === Meta 필터 ===
|
|
56
31
|
class NumberMetaFilter(CustomBaseModel):
|
|
57
|
-
"""숫자 메타 데이터 필터"""
|
|
58
32
|
key: str
|
|
59
|
-
|
|
60
|
-
max_value: Optional[float] = Field(None, alias="max")
|
|
61
|
-
equals: Optional[float] = None
|
|
62
|
-
in_list: Optional[List[float]] = Field(None, alias="in")
|
|
33
|
+
range: Optional[NumericRangeFilter] = None
|
|
63
34
|
|
|
64
|
-
|
|
65
|
-
class DateTimeMetaFilter(CustomBaseModel):
|
|
66
|
-
"""날짜/시간 메타 데이터 필터"""
|
|
35
|
+
class KeywordMetaFilter(CustomBaseModel):
|
|
67
36
|
key: str
|
|
68
|
-
from_date: Optional[str] = Field(None, alias="from")
|
|
69
|
-
to_date: Optional[str] = Field(None, alias="to")
|
|
70
37
|
equals: Optional[str] = None
|
|
38
|
+
contains: Optional[str] = None
|
|
39
|
+
keyword_in: Optional[List[str]] = Field(None, alias="in")
|
|
71
40
|
|
|
41
|
+
class DateMetaFilter(CustomBaseModel):
|
|
42
|
+
key: str
|
|
43
|
+
range: Optional[DateTimeRangeFilterOption] = None
|
|
72
44
|
|
|
73
|
-
class
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
number_meta: Optional[List[NumberMetaFilter]] = Field(None, alias="numberMeta")
|
|
77
|
-
date_time_meta: Optional[List[DateTimeMetaFilter]] = Field(None, alias="dateTimeMeta")
|
|
45
|
+
class MiscMetaFilter(CustomBaseModel):
|
|
46
|
+
key: str
|
|
47
|
+
equals: str
|
|
78
48
|
|
|
49
|
+
class MetaFilter(CustomBaseModel):
|
|
50
|
+
num: Optional[List[NumberMetaFilter]] = None
|
|
51
|
+
keyword: Optional[List[KeywordMetaFilter]] = None
|
|
52
|
+
date: Optional[List[DateMetaFilter]] = None
|
|
53
|
+
misc: Optional[List[MiscMetaFilter]] = None
|
|
79
54
|
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
not_in: Optional[List[DataStatus]] = Field(None, alias="notIn")
|
|
55
|
+
# === Count 필터 ===
|
|
56
|
+
class CountFilter(CustomBaseModel):
|
|
57
|
+
key: str
|
|
58
|
+
range: Optional[NumericRangeFilter] = None
|
|
85
59
|
|
|
60
|
+
class DistanceCountFilter(CustomBaseModel):
|
|
61
|
+
key: str
|
|
62
|
+
distance_range: NumericRangeFilter = Field(..., alias="distanceRange")
|
|
63
|
+
count_range: NumericRangeFilter = Field(..., alias="countRange")
|
|
64
|
+
|
|
65
|
+
class FrameCountsFilter(CustomBaseModel):
|
|
66
|
+
annotation_class: Optional[List[CountFilter]] = Field(None, alias="class")
|
|
67
|
+
group: Optional[List[CountFilter]] = None
|
|
68
|
+
sub_class: Optional[List[CountFilter]] = Field(None, alias="subClass")
|
|
69
|
+
distance: Optional[List[DistanceCountFilter]] = None
|
|
70
|
+
|
|
71
|
+
# === Frame 필터 ===
|
|
72
|
+
class FrameFilterOptions(CustomBaseModel):
|
|
73
|
+
index: Optional[NumericRangeFilter] = None
|
|
74
|
+
version_contains: Optional[str] = Field(None, alias="versionContains")
|
|
75
|
+
channels_in: Optional[List[str]] = Field(None, alias="channelsIn")
|
|
76
|
+
timestamp: Optional[DateTimeRangeFilterOption] = None
|
|
77
|
+
location: Optional[GeoLocationFilter] = None
|
|
78
|
+
meta: Optional[MetaFilter] = None
|
|
79
|
+
counts: Optional[FrameCountsFilter] = None
|
|
80
|
+
|
|
81
|
+
# === Data 필터 ===
|
|
82
|
+
class DataFilterOptions(CustomBaseModel):
|
|
83
|
+
id_in: Optional[List[str]] = Field(None, alias="idIn")
|
|
84
|
+
slice_id_in: Optional[List[str]] = Field(None, alias="sliceIdIn")
|
|
85
|
+
key_contains: Optional[str] = Field(None, alias="keyContains")
|
|
86
|
+
key_matches: Optional[str] = Field(None, alias="keyMatches")
|
|
87
|
+
sub_type_contains: Optional[str] = Field(None, alias="subTypeContains")
|
|
88
|
+
sub_type_matches: Optional[str] = Field(None, alias="subTypeMatches")
|
|
89
|
+
type_in: Optional[List[str]] = Field(None, alias="typeIn")
|
|
90
|
+
created_at: Optional[DateTimeRangeFilterOption] = Field(None, alias="createdAt")
|
|
91
|
+
updated_at: Optional[DateTimeRangeFilterOption] = Field(None, alias="updatedAt")
|
|
92
|
+
created_by: Optional[UserFilterOption] = Field(None, alias="createdBy")
|
|
93
|
+
updated_by: Optional[UserFilterOption] = Field(None, alias="updatedBy")
|
|
94
|
+
meta: Optional[MetaFilter] = None
|
|
95
|
+
assigned_to_user: Optional[str] = Field(None, alias="assignedToUser")
|
|
96
|
+
|
|
97
|
+
class DataSliceStatusFilterOption(CustomBaseModel):
|
|
98
|
+
status_in: Optional[List[str]] = Field(None, alias="in")
|
|
99
|
+
equals: Optional[str] = None
|
|
100
|
+
status_not_in: Optional[List[str]] = Field(None, alias="notIn")
|
|
86
101
|
|
|
87
|
-
class
|
|
88
|
-
"""데이터 슬라이스 사용자 필터 (labeler, reviewer용)"""
|
|
102
|
+
class DataSliceUserFilterOption(CustomBaseModel):
|
|
89
103
|
equals: Optional[str] = None
|
|
90
|
-
|
|
104
|
+
user_in: Optional[List[str]] = Field(None, alias="in")
|
|
91
105
|
exists: Optional[bool] = None
|
|
92
106
|
|
|
93
|
-
|
|
94
|
-
class DataSliceTagsFilter(CustomBaseModel):
|
|
95
|
-
"""데이터 슬라이스 태그 필터"""
|
|
107
|
+
class DataSliceTagsFilterOption(CustomBaseModel):
|
|
96
108
|
contains: Optional[str] = None
|
|
97
109
|
has_any: Optional[List[str]] = Field(None, alias="hasAny")
|
|
98
110
|
has_all: Optional[List[str]] = Field(None, alias="hasAll")
|
|
99
111
|
exists: Optional[bool] = None
|
|
100
112
|
|
|
101
|
-
|
|
102
|
-
class DataSliceCommentFilter(CustomBaseModel):
|
|
103
|
-
"""데이터 슬라이스 댓글 필터"""
|
|
113
|
+
class DataSliceCommentFilterOption(CustomBaseModel):
|
|
104
114
|
comment_contains: Optional[str] = Field(None, alias="commentContains")
|
|
105
115
|
category: Optional[str] = None
|
|
106
|
-
status: Optional[
|
|
107
|
-
created_by: Optional[
|
|
108
|
-
created_at: Optional[
|
|
116
|
+
status: Optional[str] = None
|
|
117
|
+
created_by: Optional[UserFilterOption] = Field(None, alias="createdBy")
|
|
118
|
+
created_at: Optional[DateTimeRangeFilterOption] = Field(None, alias="createdAt")
|
|
109
119
|
exists: Optional[bool] = None
|
|
110
120
|
|
|
111
|
-
|
|
112
121
|
class DataSlicePropertiesFilter(CustomBaseModel):
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
+
status: Optional[DataSliceStatusFilterOption] = None
|
|
123
|
+
labeler: Optional[DataSliceUserFilterOption] = None
|
|
124
|
+
reviewer: Optional[DataSliceUserFilterOption] = None
|
|
125
|
+
tags: Optional[DataSliceTagsFilterOption] = None
|
|
126
|
+
status_changed_at: Optional[DateTimeRangeFilterOption] = Field(None, alias="statusChangedAt")
|
|
127
|
+
comments: Optional[DataSliceCommentFilterOption] = None
|
|
128
|
+
meta: Optional[MetaFilter] = None
|
|
129
|
+
assigned_to_user: Optional[str] = Field(None, alias="assignedToUser")
|
|
122
130
|
|
|
123
131
|
class DataSliceFilter(CustomBaseModel):
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
not_filter: Optional[DataSlicePropertiesFilter] = Field(None, alias="not") # 만족하지 않아야 하는 조건
|
|
132
|
+
id: str
|
|
133
|
+
must_filter: Optional[DataSlicePropertiesFilter] = Field(None, alias="must")
|
|
134
|
+
not_filter: Optional[DataSlicePropertiesFilter] = Field(None, alias="not")
|
|
128
135
|
|
|
129
136
|
|
|
130
|
-
class
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
annotation_any: Optional[List[AnnotationFilter]] = Field(None, alias="annotationAny")
|
|
142
|
-
annotation_in: Optional[List[AnnotationFilter]] = Field(None, alias="annotationIn")
|
|
143
|
-
annotation_exists: Optional[bool] = Field(None, alias="annotationExists")
|
|
144
|
-
annotation_range: Optional[List[AnnotationRangeFilter]] = Field(None, alias="annotationRange")
|
|
145
|
-
prediction_set_id_in: Optional[List[str]] = Field(None, alias="predictionSetIdIn")
|
|
146
|
-
prediction_set_id_exists: Optional[bool] = Field(None, alias="predictionSetIdExists")
|
|
147
|
-
|
|
148
|
-
# 추가된 필드들 (GraphQL과 매칭)
|
|
149
|
-
created_at: Optional[DateTimeRangeFilter] = Field(None, alias="createdAt")
|
|
150
|
-
updated_at: Optional[DateTimeRangeFilter] = Field(None, alias="updatedAt")
|
|
151
|
-
created_by: Optional[UserFilter] = Field(None, alias="createdBy")
|
|
152
|
-
updated_by: Optional[UserFilter] = Field(None, alias="updatedBy")
|
|
153
|
-
meta: Optional[MetaFilterOptions] = None
|
|
137
|
+
class FrameFilter(CustomBaseModel):
|
|
138
|
+
conditions: Optional[FrameFilterOptions] = None
|
|
139
|
+
mode: Optional[Union[str, Literal["INDIVIDUAL_FRAMES", "DATA_SUMMARY"]]] = "INDIVIDUAL_FRAMES"
|
|
140
|
+
matching_frame_count: Optional[NumericRangeFilter] = Field(None, alias="matchingFrameCount")
|
|
141
|
+
|
|
142
|
+
|
|
143
|
+
class DataFilter(CustomBaseModel):
|
|
144
|
+
must_filter: Optional[DataFilterOptions] = Field(None, alias="must")
|
|
145
|
+
not_filter: Optional[DataFilterOptions] = Field(None, alias="not")
|
|
146
|
+
frames: Optional[List[FrameFilter]] = None
|
|
147
|
+
slice: Optional[DataSliceFilter] = None
|
|
154
148
|
|
|
155
149
|
|
|
156
150
|
class DataListFilter(CustomBaseModel):
|
|
157
151
|
must_filter: Optional[DataFilterOptions] = Field(None, alias="must")
|
|
158
152
|
not_filter: Optional[DataFilterOptions] = Field(None, alias="not")
|
|
159
153
|
slice: Optional[DataSliceFilter] = Field(None, alias="slice")
|
|
154
|
+
frames: Optional[List[FrameFilter]] = Field(None, alias="frames")
|
|
160
155
|
|
|
161
156
|
|
|
162
157
|
def get_data_id_list_params(
|
|
@@ -181,12 +176,9 @@ def get_data_id_list_params(
|
|
|
181
176
|
"""
|
|
182
177
|
if length > 200:
|
|
183
178
|
raise BadParameterError("The maximum length is 200.")
|
|
184
|
-
|
|
185
179
|
return {
|
|
186
180
|
"dataset_id": dataset_id,
|
|
187
|
-
"filter": data_filter.model_dump(
|
|
188
|
-
by_alias=True, exclude_unset=True
|
|
189
|
-
) if data_filter else None,
|
|
181
|
+
"filter": data_filter.model_dump(by_alias=True, exclude_unset=True) if data_filter else None,
|
|
190
182
|
"cursor": cursor,
|
|
191
183
|
"length": length
|
|
192
184
|
}
|
|
@@ -215,12 +207,9 @@ def get_data_list_params(
|
|
|
215
207
|
|
|
216
208
|
if length > 50:
|
|
217
209
|
raise BadParameterError("The maximum length is 50.")
|
|
218
|
-
|
|
219
210
|
return {
|
|
220
211
|
"dataset_id": dataset_id,
|
|
221
|
-
"filter": data_filter.model_dump(
|
|
222
|
-
by_alias=True, exclude_unset=True
|
|
223
|
-
) if data_filter else None,
|
|
212
|
+
"filter": data_filter.model_dump(by_alias=True, exclude_unset=True) if data_filter else None,
|
|
224
213
|
"cursor": cursor,
|
|
225
214
|
"length": length
|
|
226
215
|
}
|
spb_onprem/data/queries.py
CHANGED
|
@@ -31,6 +31,10 @@ class Schemas:
|
|
|
31
31
|
data {
|
|
32
32
|
id
|
|
33
33
|
}
|
|
34
|
+
selectedFrames {
|
|
35
|
+
id
|
|
36
|
+
selectedFrameIndex
|
|
37
|
+
}
|
|
34
38
|
next
|
|
35
39
|
totalCount
|
|
36
40
|
'''
|
|
@@ -254,6 +258,10 @@ class Queries():
|
|
|
254
258
|
length: $length
|
|
255
259
|
) {{
|
|
256
260
|
{Schemas.DATA_PAGE}
|
|
261
|
+
selectedFrames {{
|
|
262
|
+
dataId
|
|
263
|
+
selectedFrameIndex
|
|
264
|
+
}}
|
|
257
265
|
next
|
|
258
266
|
totalCount
|
|
259
267
|
}}
|
|
@@ -623,7 +631,7 @@ class Queries():
|
|
|
623
631
|
GET_DETAIL = {
|
|
624
632
|
"name": "data",
|
|
625
633
|
"query": f'''
|
|
626
|
-
query GetDataDetail($datasetId:
|
|
634
|
+
query GetDataDetail($datasetId: ID!, $id: ID!) {{
|
|
627
635
|
data(datasetId: $datasetId, id: $id) {{
|
|
628
636
|
{Schemas.DATA_DETAIL}
|
|
629
637
|
}}
|
spb_onprem/data/service.py
CHANGED
|
@@ -121,10 +121,13 @@ class DataService(BaseService):
|
|
|
121
121
|
)
|
|
122
122
|
data_list = response.get("data", [])
|
|
123
123
|
data = [Data.model_validate(data_dict) for data_dict in data_list]
|
|
124
|
+
|
|
125
|
+
selected_frames = response.get("selectedFrames", [])
|
|
126
|
+
|
|
124
127
|
return (
|
|
125
128
|
data,
|
|
126
129
|
response.get("next", None),
|
|
127
|
-
response.get("totalCount", 0)
|
|
130
|
+
response.get("totalCount", 0),
|
|
128
131
|
)
|
|
129
132
|
|
|
130
133
|
def get_data_id_list(
|
spb_onprem/searches.py
CHANGED
|
@@ -1,22 +1,28 @@
|
|
|
1
1
|
# Filters
|
|
2
2
|
from .data.params.data_list import (
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
DateTimeRangeFilter,
|
|
8
|
-
UserFilter,
|
|
9
|
-
StringMetaFilter,
|
|
3
|
+
DateTimeRangeFilterOption,
|
|
4
|
+
UserFilterOption,
|
|
5
|
+
NumericRangeFilter,
|
|
6
|
+
GeoLocationFilter,
|
|
10
7
|
NumberMetaFilter,
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
8
|
+
KeywordMetaFilter,
|
|
9
|
+
DateMetaFilter,
|
|
10
|
+
MiscMetaFilter,
|
|
11
|
+
MetaFilter,
|
|
12
|
+
CountFilter,
|
|
13
|
+
DistanceCountFilter,
|
|
14
|
+
FrameCountsFilter,
|
|
15
|
+
FrameFilterOptions,
|
|
16
|
+
DataFilterOptions,
|
|
17
|
+
DataSliceStatusFilterOption,
|
|
18
|
+
DataSliceUserFilterOption,
|
|
19
|
+
DataSliceTagsFilterOption,
|
|
20
|
+
DataSliceCommentFilterOption,
|
|
17
21
|
DataSlicePropertiesFilter,
|
|
18
22
|
DataSliceFilter,
|
|
19
|
-
|
|
23
|
+
FrameFilter,
|
|
24
|
+
DataFilter,
|
|
25
|
+
DataListFilter,
|
|
20
26
|
)
|
|
21
27
|
from .datasets.params.datasets import (
|
|
22
28
|
DatasetsFilter,
|
|
@@ -36,23 +42,29 @@ from .exports.params.exports import (
|
|
|
36
42
|
)
|
|
37
43
|
|
|
38
44
|
__all__ = [
|
|
39
|
-
"
|
|
40
|
-
"
|
|
41
|
-
"
|
|
42
|
-
"
|
|
43
|
-
"DateTimeRangeFilter",
|
|
44
|
-
"UserFilter",
|
|
45
|
-
"StringMetaFilter",
|
|
45
|
+
"DateTimeRangeFilterOption",
|
|
46
|
+
"UserFilterOption",
|
|
47
|
+
"NumericRangeFilter",
|
|
48
|
+
"GeoLocationFilter",
|
|
46
49
|
"NumberMetaFilter",
|
|
47
|
-
"
|
|
48
|
-
"
|
|
49
|
-
"
|
|
50
|
-
"
|
|
51
|
-
"
|
|
52
|
-
"
|
|
50
|
+
"KeywordMetaFilter",
|
|
51
|
+
"DateMetaFilter",
|
|
52
|
+
"MiscMetaFilter",
|
|
53
|
+
"MetaFilter",
|
|
54
|
+
"CountFilter",
|
|
55
|
+
"DistanceCountFilter",
|
|
56
|
+
"FrameCountsFilter",
|
|
57
|
+
"FrameFilterOptions",
|
|
58
|
+
"DataFilterOptions",
|
|
59
|
+
"DataSliceStatusFilterOption",
|
|
60
|
+
"DataSliceUserFilterOption",
|
|
61
|
+
"DataSliceTagsFilterOption",
|
|
62
|
+
"DataSliceCommentFilterOption",
|
|
53
63
|
"DataSlicePropertiesFilter",
|
|
54
64
|
"DataSliceFilter",
|
|
55
|
-
"
|
|
65
|
+
"FrameFilter",
|
|
66
|
+
"DataFilter",
|
|
67
|
+
"DataListFilter",
|
|
56
68
|
"DatasetsFilter",
|
|
57
69
|
"DatasetsFilterOptions",
|
|
58
70
|
"SlicesFilter",
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
spb_onprem/__init__.py,sha256=
|
|
2
|
-
spb_onprem/_version.py,sha256=
|
|
1
|
+
spb_onprem/__init__.py,sha256=hgeMIWnsrFOX7W5AtVwIBcD8LSwvk5puKtpfRMH4iTo,3223
|
|
2
|
+
spb_onprem/_version.py,sha256=MAYWefOLb6kbIRub18WSzK6ggSjz1LNLy9aDRlX9Ea4,704
|
|
3
3
|
spb_onprem/base_model.py,sha256=XLtyoxRBs68LrvbFH8V4EvQGPc2W17koC310MnS37jc,442
|
|
4
4
|
spb_onprem/base_service.py,sha256=_6aLM_zn4Ycd7nAc_BA395KmxH5lcSxd7gmgG9DdOf4,6518
|
|
5
5
|
spb_onprem/base_types.py,sha256=5HO6uy6qf08b4KSElwIaGy7UkoQG2KqVO6gcHbsqqSo,269
|
|
6
6
|
spb_onprem/entities.py,sha256=LoywYC22ErWIWcJZQYg_foO_5c25pd77_11tFIKhsZk,1084
|
|
7
7
|
spb_onprem/exceptions.py,sha256=jx5rTGsVZ5shOdbgQzk8GcSyMWFtb_3xhPq6Sylwc5o,478
|
|
8
|
-
spb_onprem/searches.py,sha256
|
|
8
|
+
spb_onprem/searches.py,sha256=D6FUAf0cpjkRxNOBnz3HDFcnVFxSu2B6xkHMWKF0dOU,1754
|
|
9
9
|
spb_onprem/activities/__init__.py,sha256=iTHUza8mtiBd_QEPH-0tzrOsd_VSwSQNMbzVWfebQ6c,175
|
|
10
10
|
spb_onprem/activities/queries.py,sha256=L01PRDUQdbbIGoKP_M-CmZ1ORQzuq9NOr-rdWLW0ejE,6083
|
|
11
11
|
spb_onprem/activities/service.py,sha256=jWfgAZGrULR8IETdPtUoNjwJDm-Zs8ZiC23eQEYBveA,11431
|
|
@@ -32,8 +32,8 @@ spb_onprem/contents/params/create.py,sha256=JLMbNiIecOsVvVSYY6DfUpWjZxZKuO9-NSpu
|
|
|
32
32
|
spb_onprem/contents/params/delete_content.py,sha256=_M9d6FJpA47_pcM5YyHbMmTZv1F2wUwPryQTL9RxZwM,298
|
|
33
33
|
spb_onprem/contents/params/get_download_url.py,sha256=3oaiqmjJRxw0U59SoTxoih1pcU-cuQvcU-g89lCcqtQ,98
|
|
34
34
|
spb_onprem/data/__init__.py,sha256=5XKxNm2BlKufrX5uRQreUEzJ-nerTrozKpG1RJL5wt8,68
|
|
35
|
-
spb_onprem/data/queries.py,sha256=
|
|
36
|
-
spb_onprem/data/service.py,sha256=
|
|
35
|
+
spb_onprem/data/queries.py,sha256=3gfb25EI_oqO6PoGlUGBObNW2lAj4ej7-V_3gA9P5vM,17313
|
|
36
|
+
spb_onprem/data/service.py,sha256=CfYXrze9DLeNbWugjPYFUWEQeDwxncC1ISzvqptgYVs,26136
|
|
37
37
|
spb_onprem/data/entities/__init__.py,sha256=ZQ2YWAHIan2ZLa1z5ozPSJwW3pqdlsJCxmAT3NuG89c,376
|
|
38
38
|
spb_onprem/data/entities/annotation.py,sha256=pS97Nx3TWMBrb-iiBfRct4RXl7hPMy2IOzTIpXkmBJU,751
|
|
39
39
|
spb_onprem/data/entities/data.py,sha256=TOdnete4bfwROQ7C7oew7vV8bZyewQvFdjccyx4mec8,1217
|
|
@@ -47,13 +47,13 @@ spb_onprem/data/enums/data_meta_type.py,sha256=9rd12-7C1udbbIGvnuGURKmd5-lndtW7o
|
|
|
47
47
|
spb_onprem/data/enums/data_status.py,sha256=uV_yLtigSmht-tKFaLwvO4MpV5j4GzwuBRDILGrxMBA,292
|
|
48
48
|
spb_onprem/data/enums/data_type.py,sha256=9ErNmOK-RIOrhyt25SE2WVPSx_nTxt3ncTG5UtW92iM,225
|
|
49
49
|
spb_onprem/data/enums/scene_type.py,sha256=pTibjST4nJc3ylUrjQifYBdtLIcS2D0q71bdhyDjbIk,205
|
|
50
|
-
spb_onprem/data/params/__init__.py,sha256=
|
|
50
|
+
spb_onprem/data/params/__init__.py,sha256=Haiq-OCMEngWSxXmYKuTpp4DApN58ffGltFp61s83eI,3546
|
|
51
51
|
spb_onprem/data/params/change_data_labeler.py,sha256=jUG6bm0uheR1jVCy-RwFY97C9K93fdDdf3KDHJIelM4,570
|
|
52
52
|
spb_onprem/data/params/change_data_reviewer.py,sha256=dFix3NfS2_8lpaoWxz6anLEJWMLdmRKM34ib8XwQiVQ,577
|
|
53
53
|
spb_onprem/data/params/change_data_status.py,sha256=34gGtmTJT8wiDDpHOgQYvgP0-ziuYEBDFlpfY8SAZtI,593
|
|
54
54
|
spb_onprem/data/params/create_data.py,sha256=aL6Bwd9talB2rnmdHbR9QkUx1Msni07-6aoBkhGoivM,1827
|
|
55
55
|
spb_onprem/data/params/data.py,sha256=ZPJRjCbkjOCV73NxlGm5DxbSaNOAztVBRZRE8FFQ9mw,779
|
|
56
|
-
spb_onprem/data/params/data_list.py,sha256=
|
|
56
|
+
spb_onprem/data/params/data_list.py,sha256=mwFuvIwz8y5trgGcSn8hKd9qmo-FWEkMkGDjngNGJlM,8376
|
|
57
57
|
spb_onprem/data/params/delete_annotation_version.py,sha256=R_jBVujor-09VS1Aa8yGP14R8nJ2Aa9OmmKezC4gz4c,457
|
|
58
58
|
spb_onprem/data/params/delete_data.py,sha256=D0tXTVbQogAhB49dHIxrX1r934kbtaJ_HOylJhLZVzA,324
|
|
59
59
|
spb_onprem/data/params/delete_prediction.py,sha256=X3sV2mrSUqg8FOlZYRtb0o1hAwFos48ydFK2Il8UCp4,479
|
|
@@ -132,7 +132,7 @@ spb_onprem/slices/params/update_slice.py,sha256=kryOmCnRTQ_OU0qDKgugppLrpeUpuLwm
|
|
|
132
132
|
spb_onprem/users/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
133
133
|
spb_onprem/users/entities/__init__.py,sha256=X8HZsCTlQnuPszok3AwI-i7bsQi0Ehul5L_2jZaol5E,57
|
|
134
134
|
spb_onprem/users/entities/auth.py,sha256=_KP-7yUErBxhJMm-dE3ObprPEG6e0JI2qNg6g8aK1qM,3371
|
|
135
|
-
superb_ai_onprem-0.
|
|
135
|
+
superb_ai_onprem-0.6.0.dist-info/licenses/LICENSE,sha256=CdinbFiHKGkGl6cPde6WgXhMuzyUXEG6tzy2-7udZ8o,1066
|
|
136
136
|
tests/__init__.py,sha256=Nqnn8clbgv-5l0PgxcTOldg8mkMKrFn4TvPL-rYUUGg,1
|
|
137
137
|
tests/activities/__init__.py,sha256=Nqnn8clbgv-5l0PgxcTOldg8mkMKrFn4TvPL-rYUUGg,1
|
|
138
138
|
tests/activities/real_test.py,sha256=0gQHg7rIEuZndGZyNHMWSD5nUZPMsUGigfCjWFxMthQ,1786
|
|
@@ -140,7 +140,7 @@ tests/activities/test_get_activity_history.py,sha256=gNLc4OQLgw9wqToRxV0y5REAHPu
|
|
|
140
140
|
tests/activities/test_params.py,sha256=P_k03Ll-We3gyFTeACalErP1UzwS2gB6ayIerKMMLEU,2335
|
|
141
141
|
tests/activities/test_service.py,sha256=8nijwzJlAFL9S0TqyuAvOJZzBvPPjxJbrj3EyziT_Ng,4407
|
|
142
142
|
tests/data/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
143
|
-
tests/data/test_data_service.py,sha256=
|
|
143
|
+
tests/data/test_data_service.py,sha256=Lgh74J6lI3PhBNwAIbvd5brgmT0ktEOf3MclGIYjAEE,16823
|
|
144
144
|
tests/datasets/__init__.py,sha256=nMsjhPXe9rU87gI_wasqCtz7SsTae2LzpUUnXXzS5zI,23
|
|
145
145
|
tests/datasets/test_dataset_service.py,sha256=RYY60U2TwKNv5JWzzkgUfP8ZgT5UYvgTYOl_fyp-Gek,4807
|
|
146
146
|
tests/exports/__init__.py,sha256=iBqr781TtnT1Tm5wLTCsdftpuRgQifIibxWrB_I7tiw,23
|
|
@@ -153,7 +153,7 @@ tests/models/__init__.py,sha256=Z2naiUgIjI-nHGsldwze1BqpV5JfDKTaBk-vg6_h6t4,21
|
|
|
153
153
|
tests/models/test_model_service.py,sha256=lQKFPHlfxhqcnrKHz6l2sGp53lpmC_kCHgQ-sXBbgMw,7556
|
|
154
154
|
tests/predictions/__init__.py,sha256=mFAXy0xOEXVYM7quYfIhwSih3kcEDdD4rLPq5G91Igg,26
|
|
155
155
|
tests/predictions/test_prediction_service.py,sha256=u2MYXNXSXKRAbv-Rz7sV0roitbD2h5U5ZIAaqeFMA1M,12632
|
|
156
|
-
superb_ai_onprem-0.
|
|
157
|
-
superb_ai_onprem-0.
|
|
158
|
-
superb_ai_onprem-0.
|
|
159
|
-
superb_ai_onprem-0.
|
|
156
|
+
superb_ai_onprem-0.6.0.dist-info/METADATA,sha256=KYzPeykb_eqvnZlNT9vTwo3pf2o4eQbLjABQw65oKRc,5817
|
|
157
|
+
superb_ai_onprem-0.6.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
158
|
+
superb_ai_onprem-0.6.0.dist-info/top_level.txt,sha256=LbqU6FjWKaxO7FPS5-71e3OIS8VgBi5VrtQMWFOW25Q,17
|
|
159
|
+
superb_ai_onprem-0.6.0.dist-info/RECORD,,
|
tests/data/test_data_service.py
CHANGED
|
@@ -125,7 +125,7 @@ class TestDataService:
|
|
|
125
125
|
query_structure = Queries.GET_DETAIL
|
|
126
126
|
|
|
127
127
|
# Assert
|
|
128
|
-
assert query_structure["name"] == "
|
|
128
|
+
assert query_structure["name"] == "data"
|
|
129
129
|
assert "query GetDataDetail($datasetId: ID!, $id: ID!)" in query_structure["query"]
|
|
130
130
|
assert "data(datasetId: $datasetId, id: $id)" in query_structure["query"]
|
|
131
131
|
assert callable(query_structure["variables"])
|
|
File without changes
|
|
File without changes
|
|
File without changes
|