superb-ai-onprem 0.8.3__py3-none-any.whl → 0.9.1__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 +0 -5
- spb_onprem/_version.py +2 -2
- spb_onprem/data/entities/__init__.py +0 -2
- spb_onprem/data/entities/data.py +1 -4
- spb_onprem/data/params/__init__.py +0 -12
- spb_onprem/data/params/create_data.py +1 -11
- spb_onprem/data/queries.py +0 -81
- spb_onprem/data/service.py +0 -118
- spb_onprem/entities.py +0 -4
- {superb_ai_onprem-0.8.3.dist-info → superb_ai_onprem-0.9.1.dist-info}/METADATA +1 -1
- {superb_ai_onprem-0.8.3.dist-info → superb_ai_onprem-0.9.1.dist-info}/RECORD +15 -18
- tests/data/test_data_service.py +0 -211
- spb_onprem/data/params/delete_prediction.py +0 -22
- spb_onprem/data/params/get_evaluation_value_list.py +0 -36
- spb_onprem/data/params/insert_prediction.py +0 -25
- {superb_ai_onprem-0.8.3.dist-info → superb_ai_onprem-0.9.1.dist-info}/WHEEL +0 -0
- {superb_ai_onprem-0.8.3.dist-info → superb_ai_onprem-0.9.1.dist-info}/licenses/LICENSE +0 -0
- {superb_ai_onprem-0.8.3.dist-info → superb_ai_onprem-0.9.1.dist-info}/top_level.txt +0 -0
spb_onprem/__init__.py
CHANGED
|
@@ -10,7 +10,6 @@ from .slices.service import SliceService
|
|
|
10
10
|
from .activities.service import ActivityService
|
|
11
11
|
from .exports.service import ExportService
|
|
12
12
|
from .contents.service import ContentService
|
|
13
|
-
from .predictions.service import PredictionService
|
|
14
13
|
from .models.service import ModelService
|
|
15
14
|
from .inferences.service import InferService
|
|
16
15
|
|
|
@@ -21,7 +20,6 @@ from .entities import (
|
|
|
21
20
|
Scene,
|
|
22
21
|
Annotation,
|
|
23
22
|
AnnotationVersion,
|
|
24
|
-
Prediction,
|
|
25
23
|
DataMeta,
|
|
26
24
|
Dataset,
|
|
27
25
|
Slice,
|
|
@@ -90,7 +88,6 @@ __all__ = (
|
|
|
90
88
|
"ActivityService",
|
|
91
89
|
"ExportService",
|
|
92
90
|
"ContentService",
|
|
93
|
-
"PredictionService",
|
|
94
91
|
"ModelService",
|
|
95
92
|
"InferService",
|
|
96
93
|
|
|
@@ -99,7 +96,6 @@ __all__ = (
|
|
|
99
96
|
"Scene",
|
|
100
97
|
"Annotation",
|
|
101
98
|
"AnnotationVersion",
|
|
102
|
-
"Prediction",
|
|
103
99
|
"DataMeta",
|
|
104
100
|
"Dataset",
|
|
105
101
|
"Slice",
|
|
@@ -109,7 +105,6 @@ __all__ = (
|
|
|
109
105
|
"Export",
|
|
110
106
|
"Content",
|
|
111
107
|
"Frame",
|
|
112
|
-
"PredictionSet",
|
|
113
108
|
"Model",
|
|
114
109
|
"Comment",
|
|
115
110
|
"Reply",
|
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.9.1'
|
|
32
|
+
__version_tuple__ = version_tuple = (0, 9, 1)
|
|
33
33
|
|
|
34
34
|
__commit_id__ = commit_id = None
|
|
@@ -2,7 +2,6 @@ from .annotation import Annotation, AnnotationVersion
|
|
|
2
2
|
from .comment import Comment, Reply
|
|
3
3
|
from .data_meta import DataMeta
|
|
4
4
|
from .data import Data
|
|
5
|
-
from .prediction import Prediction
|
|
6
5
|
from .scene import Scene
|
|
7
6
|
from .data_slice import DataSlice
|
|
8
7
|
from .frame import Frame
|
|
@@ -16,7 +15,6 @@ __all__ = (
|
|
|
16
15
|
"AnnotationVersion",
|
|
17
16
|
"Comment",
|
|
18
17
|
"Reply",
|
|
19
|
-
"Prediction",
|
|
20
18
|
"DataMeta",
|
|
21
19
|
"DataSlice",
|
|
22
20
|
)
|
spb_onprem/data/entities/data.py
CHANGED
|
@@ -3,7 +3,6 @@ from spb_onprem.base_model import CustomBaseModel, Field
|
|
|
3
3
|
from spb_onprem.data.enums import DataType
|
|
4
4
|
from .scene import Scene
|
|
5
5
|
from .annotation import Annotation
|
|
6
|
-
from .prediction import Prediction
|
|
7
6
|
from .data_meta import DataMeta
|
|
8
7
|
from .data_slice import DataSlice
|
|
9
8
|
from .frame import Frame
|
|
@@ -19,7 +18,6 @@ class Data(CustomBaseModel):
|
|
|
19
18
|
# 식별자
|
|
20
19
|
id: Optional[str] = Field(None, description="데이터 고유 식별자")
|
|
21
20
|
dataset_id: Optional[str] = Field(None, alias="datasetId", description="상위 데이터셋 ID")
|
|
22
|
-
slice_ids: Optional[List[str]] = Field(None, alias="sliceIds", description="소속된 슬라이스 ID 목록")
|
|
23
21
|
key: Optional[str] = Field(None, description="사용자 정의 고유 키")
|
|
24
22
|
|
|
25
23
|
# 데이터 타입 및 내용
|
|
@@ -30,8 +28,7 @@ class Data(CustomBaseModel):
|
|
|
30
28
|
|
|
31
29
|
# 어노테이션 및 예측
|
|
32
30
|
annotation: Optional[Annotation] = Field(None, description="어노테이션 데이터")
|
|
33
|
-
|
|
34
|
-
|
|
31
|
+
|
|
35
32
|
# 메타데이터
|
|
36
33
|
meta: Optional[List[DataMeta]] = Field(None, description="커스텀 메타데이터 목록")
|
|
37
34
|
|
|
@@ -37,9 +37,6 @@ from .data_list import (
|
|
|
37
37
|
from .get_data_detail import (
|
|
38
38
|
get_data_detail_params,
|
|
39
39
|
)
|
|
40
|
-
from .get_evaluation_value_list import (
|
|
41
|
-
get_evaluation_value_list_params,
|
|
42
|
-
)
|
|
43
40
|
from .remove_data_from_slice import (
|
|
44
41
|
remove_data_from_slice_params
|
|
45
42
|
)
|
|
@@ -49,12 +46,6 @@ from .insert_data_to_slice import (
|
|
|
49
46
|
from .delete_data import (
|
|
50
47
|
delete_data_params
|
|
51
48
|
)
|
|
52
|
-
from .insert_prediction import (
|
|
53
|
-
insert_prediction_params
|
|
54
|
-
)
|
|
55
|
-
from .delete_prediction import (
|
|
56
|
-
delete_prediction_params
|
|
57
|
-
)
|
|
58
49
|
from .update_annotation import (
|
|
59
50
|
update_annotation_params
|
|
60
51
|
)
|
|
@@ -99,7 +90,6 @@ __all__ = [
|
|
|
99
90
|
"get_data_id_list_params",
|
|
100
91
|
"get_data_list_params",
|
|
101
92
|
"get_data_detail_params",
|
|
102
|
-
"get_evaluation_value_list_params",
|
|
103
93
|
"DateTimeRangeFilterOption",
|
|
104
94
|
"UserFilterOption",
|
|
105
95
|
"NumericRangeFilter",
|
|
@@ -126,8 +116,6 @@ __all__ = [
|
|
|
126
116
|
"remove_data_from_slice_params",
|
|
127
117
|
"insert_data_to_slice_params",
|
|
128
118
|
"delete_data_params",
|
|
129
|
-
"insert_prediction_params",
|
|
130
|
-
"delete_prediction_params",
|
|
131
119
|
"update_annotation_params",
|
|
132
120
|
"insert_annotation_version_params",
|
|
133
121
|
"delete_annotation_version_params",
|
|
@@ -13,7 +13,7 @@ def create_params(
|
|
|
13
13
|
"datasetId": data.dataset_id,
|
|
14
14
|
"key": data.key,
|
|
15
15
|
"type": data.type.value,
|
|
16
|
-
"slices": data.
|
|
16
|
+
"slices": [slice.id for slice in data.slices] if data.slices is not None else [],
|
|
17
17
|
"scene": [
|
|
18
18
|
{
|
|
19
19
|
"type": scene.type.value,
|
|
@@ -39,16 +39,6 @@ def create_params(
|
|
|
39
39
|
] if data.annotation.versions is not None else [],
|
|
40
40
|
"meta": data.annotation.meta
|
|
41
41
|
} if data.annotation is not None else None,
|
|
42
|
-
"predictions": [
|
|
43
|
-
{
|
|
44
|
-
"setId": prediction.set_id,
|
|
45
|
-
"content": {
|
|
46
|
-
"id": prediction.content.id,
|
|
47
|
-
},
|
|
48
|
-
"meta": prediction.meta,
|
|
49
|
-
}
|
|
50
|
-
for prediction in data.predictions
|
|
51
|
-
] if data.predictions is not None else [],
|
|
52
42
|
"meta": [
|
|
53
43
|
{
|
|
54
44
|
"key": meta.key,
|
spb_onprem/data/queries.py
CHANGED
|
@@ -5,12 +5,9 @@ from .params import (
|
|
|
5
5
|
get_data_id_list_params,
|
|
6
6
|
get_data_list_params,
|
|
7
7
|
get_data_detail_params,
|
|
8
|
-
get_evaluation_value_list_params,
|
|
9
8
|
remove_data_from_slice_params,
|
|
10
9
|
insert_data_to_slice_params,
|
|
11
10
|
delete_data_params,
|
|
12
|
-
insert_prediction_params,
|
|
13
|
-
delete_prediction_params,
|
|
14
11
|
update_annotation_params,
|
|
15
12
|
insert_annotation_version_params,
|
|
16
13
|
delete_annotation_version_params,
|
|
@@ -42,7 +39,6 @@ class Schemas:
|
|
|
42
39
|
DATA = '''
|
|
43
40
|
id
|
|
44
41
|
datasetId
|
|
45
|
-
sliceIds
|
|
46
42
|
key
|
|
47
43
|
type
|
|
48
44
|
scene {
|
|
@@ -120,13 +116,6 @@ class Schemas:
|
|
|
120
116
|
}
|
|
121
117
|
meta
|
|
122
118
|
}
|
|
123
|
-
predictions {
|
|
124
|
-
setId
|
|
125
|
-
content {
|
|
126
|
-
id
|
|
127
|
-
}
|
|
128
|
-
meta
|
|
129
|
-
}
|
|
130
119
|
thumbnail {
|
|
131
120
|
id
|
|
132
121
|
}
|
|
@@ -155,7 +144,6 @@ class Queries():
|
|
|
155
144
|
$scene: [SceneInput!],
|
|
156
145
|
$thumbnail: ContentBaseInput,
|
|
157
146
|
$annotation: AnnotationInput,
|
|
158
|
-
$predictions: [PredictionInput!],
|
|
159
147
|
$meta: [DataMetaInput!]
|
|
160
148
|
) {{
|
|
161
149
|
createData(
|
|
@@ -166,7 +154,6 @@ class Queries():
|
|
|
166
154
|
scene: $scene,
|
|
167
155
|
thumbnail: $thumbnail,
|
|
168
156
|
annotation: $annotation,
|
|
169
|
-
predictions: $predictions,
|
|
170
157
|
meta: $meta,
|
|
171
158
|
)
|
|
172
159
|
{{
|
|
@@ -325,46 +312,6 @@ class Queries():
|
|
|
325
312
|
''',
|
|
326
313
|
"variables": delete_data_params,
|
|
327
314
|
}
|
|
328
|
-
|
|
329
|
-
INSERT_PREDICTION = {
|
|
330
|
-
"name": "insertPrediction",
|
|
331
|
-
"query": f'''
|
|
332
|
-
mutation (
|
|
333
|
-
$dataset_id: ID!,
|
|
334
|
-
$data_id: ID!,
|
|
335
|
-
$prediction: PredictionInput!,
|
|
336
|
-
) {{
|
|
337
|
-
insertPrediction(
|
|
338
|
-
datasetId: $dataset_id,
|
|
339
|
-
dataId: $data_id,
|
|
340
|
-
prediction: $prediction,
|
|
341
|
-
) {{
|
|
342
|
-
{Schemas.DATA}
|
|
343
|
-
}}
|
|
344
|
-
}}
|
|
345
|
-
''',
|
|
346
|
-
"variables": insert_prediction_params,
|
|
347
|
-
}
|
|
348
|
-
|
|
349
|
-
DELETE_PREDICTION = {
|
|
350
|
-
"name": "deletePrediction",
|
|
351
|
-
"query": f'''
|
|
352
|
-
mutation (
|
|
353
|
-
$dataset_id: ID!,
|
|
354
|
-
$data_id: ID!,
|
|
355
|
-
$set_id: ID!,
|
|
356
|
-
) {{
|
|
357
|
-
deletePrediction(
|
|
358
|
-
datasetId: $dataset_id,
|
|
359
|
-
dataId: $data_id,
|
|
360
|
-
setId: $set_id,
|
|
361
|
-
) {{
|
|
362
|
-
{Schemas.DATA}
|
|
363
|
-
}}
|
|
364
|
-
}}
|
|
365
|
-
''',
|
|
366
|
-
"variables": delete_prediction_params,
|
|
367
|
-
}
|
|
368
315
|
|
|
369
316
|
UPDATE_ANNOTATION = {
|
|
370
317
|
"name": "updateAnnotation",
|
|
@@ -627,31 +574,3 @@ class Queries():
|
|
|
627
574
|
''',
|
|
628
575
|
"variables": update_frames_params,
|
|
629
576
|
}
|
|
630
|
-
|
|
631
|
-
GET_EVALUATION_VALUE_LIST = {
|
|
632
|
-
"name": "evaluationValueList",
|
|
633
|
-
"query": '''
|
|
634
|
-
query GetEvaluationValueList(
|
|
635
|
-
$datasetId: String!,
|
|
636
|
-
$predictionSetId: String!,
|
|
637
|
-
$filter: DiagnosisFilter,
|
|
638
|
-
$length: Int,
|
|
639
|
-
$cursor: String
|
|
640
|
-
) {
|
|
641
|
-
evaluationValueList(
|
|
642
|
-
datasetId: $datasetId,
|
|
643
|
-
predictionSetId: $predictionSetId,
|
|
644
|
-
filter: $filter,
|
|
645
|
-
length: $length,
|
|
646
|
-
cursor: $cursor
|
|
647
|
-
) {
|
|
648
|
-
totalCount
|
|
649
|
-
next
|
|
650
|
-
data {
|
|
651
|
-
dataId
|
|
652
|
-
}
|
|
653
|
-
}
|
|
654
|
-
}
|
|
655
|
-
''',
|
|
656
|
-
"variables": get_evaluation_value_list_params
|
|
657
|
-
}
|
spb_onprem/data/service.py
CHANGED
|
@@ -17,7 +17,6 @@ from .queries import Queries
|
|
|
17
17
|
from .entities import (
|
|
18
18
|
Data,
|
|
19
19
|
AnnotationVersion,
|
|
20
|
-
Prediction,
|
|
21
20
|
Frame,
|
|
22
21
|
DataMeta,
|
|
23
22
|
)
|
|
@@ -297,60 +296,6 @@ class DataService(BaseService):
|
|
|
297
296
|
)
|
|
298
297
|
return response
|
|
299
298
|
|
|
300
|
-
def insert_prediction(
|
|
301
|
-
self,
|
|
302
|
-
dataset_id: str,
|
|
303
|
-
data_id: str,
|
|
304
|
-
prediction: Prediction,
|
|
305
|
-
):
|
|
306
|
-
"""Insert a prediction.
|
|
307
|
-
|
|
308
|
-
Args:
|
|
309
|
-
dataset_id (str): The dataset id.
|
|
310
|
-
data_id (str): The data id.
|
|
311
|
-
prediction (Prediction): The prediction.
|
|
312
|
-
|
|
313
|
-
Returns:
|
|
314
|
-
Data: The updated data.
|
|
315
|
-
"""
|
|
316
|
-
response = self.request_gql(
|
|
317
|
-
Queries.INSERT_PREDICTION,
|
|
318
|
-
Queries.INSERT_PREDICTION["variables"](
|
|
319
|
-
dataset_id=dataset_id,
|
|
320
|
-
data_id=data_id,
|
|
321
|
-
prediction=prediction,
|
|
322
|
-
)
|
|
323
|
-
)
|
|
324
|
-
data = Data.model_validate(response)
|
|
325
|
-
return data
|
|
326
|
-
|
|
327
|
-
def delete_prediction(
|
|
328
|
-
self,
|
|
329
|
-
dataset_id: str,
|
|
330
|
-
data_id: str,
|
|
331
|
-
set_id: str,
|
|
332
|
-
):
|
|
333
|
-
"""Delete a prediction.
|
|
334
|
-
|
|
335
|
-
Args:
|
|
336
|
-
dataset_id (str): The dataset id.
|
|
337
|
-
data_id (str): The data id.
|
|
338
|
-
set_id (str): The set id.
|
|
339
|
-
|
|
340
|
-
Returns:
|
|
341
|
-
Data: The updated data.
|
|
342
|
-
"""
|
|
343
|
-
response = self.request_gql(
|
|
344
|
-
Queries.DELETE_PREDICTION,
|
|
345
|
-
Queries.DELETE_PREDICTION["variables"](
|
|
346
|
-
dataset_id=dataset_id,
|
|
347
|
-
data_id=data_id,
|
|
348
|
-
set_id=set_id,
|
|
349
|
-
)
|
|
350
|
-
)
|
|
351
|
-
data = Data.model_validate(response)
|
|
352
|
-
return data
|
|
353
|
-
|
|
354
299
|
def update_annotation(
|
|
355
300
|
self,
|
|
356
301
|
dataset_id: str,
|
|
@@ -781,66 +726,3 @@ class DataService(BaseService):
|
|
|
781
726
|
)
|
|
782
727
|
data = Data.model_validate(response)
|
|
783
728
|
return data
|
|
784
|
-
|
|
785
|
-
def get_evaluation_value_list(
|
|
786
|
-
self,
|
|
787
|
-
dataset_id: str,
|
|
788
|
-
prediction_set_id: str,
|
|
789
|
-
filter: Union[UndefinedType, dict] = Undefined,
|
|
790
|
-
length: int = 50,
|
|
791
|
-
cursor: Union[UndefinedType, str] = Undefined
|
|
792
|
-
) -> dict:
|
|
793
|
-
"""Get evaluation values list for diagnosis filtering.
|
|
794
|
-
|
|
795
|
-
Retrieves evaluation values for diagnosis filtering with pagination support.
|
|
796
|
-
|
|
797
|
-
Args:
|
|
798
|
-
dataset_id (str): The dataset ID.
|
|
799
|
-
prediction_set_id (str): The prediction set ID.
|
|
800
|
-
filter (Union[UndefinedType, dict]): Diagnosis filter for evaluation values.
|
|
801
|
-
length (int): Number of items to retrieve per page.
|
|
802
|
-
cursor (Union[UndefinedType, str]): Cursor for pagination.
|
|
803
|
-
|
|
804
|
-
Returns:
|
|
805
|
-
dict: Response containing totalCount, next cursor, and data list with dataId fields.
|
|
806
|
-
"""
|
|
807
|
-
if dataset_id is None:
|
|
808
|
-
raise BadParameterError("dataset_id is required.")
|
|
809
|
-
if prediction_set_id is None:
|
|
810
|
-
raise BadParameterError("prediction_set_id is required.")
|
|
811
|
-
|
|
812
|
-
response = self.request_gql(
|
|
813
|
-
Queries.GET_EVALUATION_VALUE_LIST,
|
|
814
|
-
Queries.GET_EVALUATION_VALUE_LIST["variables"](
|
|
815
|
-
dataset_id=dataset_id,
|
|
816
|
-
prediction_set_id=prediction_set_id,
|
|
817
|
-
filter=filter,
|
|
818
|
-
length=length,
|
|
819
|
-
cursor=cursor
|
|
820
|
-
)
|
|
821
|
-
)
|
|
822
|
-
return response.get("evaluationValueList", {})
|
|
823
|
-
|
|
824
|
-
def get_total_data_id_count_in_evaluation_value(
|
|
825
|
-
self,
|
|
826
|
-
dataset_id: str,
|
|
827
|
-
prediction_set_id: str,
|
|
828
|
-
filter: Union[UndefinedType, dict] = Undefined
|
|
829
|
-
) -> int:
|
|
830
|
-
"""Get total count of data IDs in evaluation values for diagnosis filtering.
|
|
831
|
-
|
|
832
|
-
Args:
|
|
833
|
-
dataset_id (str): The dataset ID.
|
|
834
|
-
prediction_set_id (str): The prediction set ID.
|
|
835
|
-
filter (Union[UndefinedType, dict]): Diagnosis filter for evaluation values.
|
|
836
|
-
|
|
837
|
-
Returns:
|
|
838
|
-
int: Total count of evaluation values.
|
|
839
|
-
"""
|
|
840
|
-
result = self.get_evaluation_value_list(
|
|
841
|
-
dataset_id=dataset_id,
|
|
842
|
-
prediction_set_id=prediction_set_id,
|
|
843
|
-
filter=filter,
|
|
844
|
-
length=1
|
|
845
|
-
)
|
|
846
|
-
return result.get("totalCount", 0)
|
spb_onprem/entities.py
CHANGED
|
@@ -3,7 +3,6 @@ from .data.entities import (
|
|
|
3
3
|
Scene,
|
|
4
4
|
Annotation,
|
|
5
5
|
AnnotationVersion,
|
|
6
|
-
Prediction,
|
|
7
6
|
DataMeta,
|
|
8
7
|
DataSlice,
|
|
9
8
|
Frame,
|
|
@@ -29,7 +28,6 @@ from .activities.entities import (
|
|
|
29
28
|
)
|
|
30
29
|
from .exports.entities import Export
|
|
31
30
|
from .contents.entities import Content
|
|
32
|
-
from .predictions.entities import PredictionSet
|
|
33
31
|
from .models.entities import Model
|
|
34
32
|
|
|
35
33
|
__all__ = [
|
|
@@ -38,7 +36,6 @@ __all__ = [
|
|
|
38
36
|
"Scene",
|
|
39
37
|
"Annotation",
|
|
40
38
|
"AnnotationVersion",
|
|
41
|
-
"Prediction",
|
|
42
39
|
"DataMeta",
|
|
43
40
|
"DataSlice",
|
|
44
41
|
"Dataset",
|
|
@@ -48,7 +45,6 @@ __all__ = [
|
|
|
48
45
|
"Export",
|
|
49
46
|
"Content",
|
|
50
47
|
"Frame",
|
|
51
|
-
"PredictionSet",
|
|
52
48
|
"Model",
|
|
53
49
|
"Comment",
|
|
54
50
|
"Reply",
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
spb_onprem/__init__.py,sha256=
|
|
2
|
-
spb_onprem/_version.py,sha256=
|
|
1
|
+
spb_onprem/__init__.py,sha256=JZHiLuMnbQA-xFapkImbFEA8quPbG2u_iyySTMq1ENQ,3163
|
|
2
|
+
spb_onprem/_version.py,sha256=LwGndsRSpclYq-j3wgRr2nzOXwUYj0Jtg7Kof7R0BEw,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
|
-
spb_onprem/entities.py,sha256=
|
|
6
|
+
spb_onprem/entities.py,sha256=bgRWSF_ksfAD6LxVpvEx5eAHqEnFIZL4Xh2Lw2uxvi4,1103
|
|
7
7
|
spb_onprem/exceptions.py,sha256=jx5rTGsVZ5shOdbgQzk8GcSyMWFtb_3xhPq6Sylwc5o,478
|
|
8
8
|
spb_onprem/searches.py,sha256=D6FUAf0cpjkRxNOBnz3HDFcnVFxSu2B6xkHMWKF0dOU,1754
|
|
9
9
|
spb_onprem/activities/__init__.py,sha256=iTHUza8mtiBd_QEPH-0tzrOsd_VSwSQNMbzVWfebQ6c,175
|
|
@@ -33,12 +33,12 @@ spb_onprem/contents/params/delete_content.py,sha256=_M9d6FJpA47_pcM5YyHbMmTZv1F2
|
|
|
33
33
|
spb_onprem/contents/params/get_download_url.py,sha256=3oaiqmjJRxw0U59SoTxoih1pcU-cuQvcU-g89lCcqtQ,98
|
|
34
34
|
spb_onprem/contents/params/get_upload_url.py,sha256=j6s39Y796yJBTtgAbWrW7Rr1PK__XHViMq3JLEaL9xQ,263
|
|
35
35
|
spb_onprem/data/__init__.py,sha256=5XKxNm2BlKufrX5uRQreUEzJ-nerTrozKpG1RJL5wt8,68
|
|
36
|
-
spb_onprem/data/queries.py,sha256=
|
|
37
|
-
spb_onprem/data/service.py,sha256=
|
|
38
|
-
spb_onprem/data/entities/__init__.py,sha256=
|
|
36
|
+
spb_onprem/data/queries.py,sha256=2nlE18kbQsdM9MlgSlSLkh2d9x6bnB3LkTTGhhAYxps,14885
|
|
37
|
+
spb_onprem/data/service.py,sha256=R_cfMPQJFYI9x_6nACv3Et8M5QceLyYB5XVX6fJeOkE,21351
|
|
38
|
+
spb_onprem/data/entities/__init__.py,sha256=7rrLybW_FPj_tJDYbtj88VMARSMCcCPywV8D0LHFm1U,387
|
|
39
39
|
spb_onprem/data/entities/annotation.py,sha256=o6ctyXWXDPTmI97W7B1RKcqDNlZIZjrlGg-MgHavB6w,1432
|
|
40
40
|
spb_onprem/data/entities/comment.py,sha256=l7o232sfuJifbES76KPsD7Su4I58ORlZ49Wum_uNxeg,2050
|
|
41
|
-
spb_onprem/data/entities/data.py,sha256=
|
|
41
|
+
spb_onprem/data/entities/data.py,sha256=hcLhbUFMBSwoXIHisLcgeQPqg6X3iey52RdMWhA7uv8,2116
|
|
42
42
|
spb_onprem/data/entities/data_meta.py,sha256=Cm9JQ4nv8LZwJaKcmNxxvuRUOvncKnzHW0cpoLYUAMA,1044
|
|
43
43
|
spb_onprem/data/entities/data_slice.py,sha256=Fyr7iQRs2iET4Hp0DIUNQD1Qed3q46408gc9-GtDWbI,1345
|
|
44
44
|
spb_onprem/data/entities/frame.py,sha256=ue62YvdKg0L-561zgOB1KrMi5H3x-I99larcFk7CW9s,990
|
|
@@ -49,23 +49,20 @@ spb_onprem/data/enums/data_meta_type.py,sha256=vFPAZACPtFrJnzCW_F6ZheWa-Tc5w0yNv
|
|
|
49
49
|
spb_onprem/data/enums/data_status.py,sha256=uV_yLtigSmht-tKFaLwvO4MpV5j4GzwuBRDILGrxMBA,292
|
|
50
50
|
spb_onprem/data/enums/data_type.py,sha256=9ErNmOK-RIOrhyt25SE2WVPSx_nTxt3ncTG5UtW92iM,225
|
|
51
51
|
spb_onprem/data/enums/scene_type.py,sha256=pTibjST4nJc3ylUrjQifYBdtLIcS2D0q71bdhyDjbIk,205
|
|
52
|
-
spb_onprem/data/params/__init__.py,sha256=
|
|
52
|
+
spb_onprem/data/params/__init__.py,sha256=Rp63SIbYikYBwJ_K0RU7XGoEuOezVberRLehXZsF9HM,3233
|
|
53
53
|
spb_onprem/data/params/change_data_labeler.py,sha256=jUG6bm0uheR1jVCy-RwFY97C9K93fdDdf3KDHJIelM4,570
|
|
54
54
|
spb_onprem/data/params/change_data_reviewer.py,sha256=dFix3NfS2_8lpaoWxz6anLEJWMLdmRKM34ib8XwQiVQ,577
|
|
55
55
|
spb_onprem/data/params/change_data_status.py,sha256=34gGtmTJT8wiDDpHOgQYvgP0-ziuYEBDFlpfY8SAZtI,593
|
|
56
|
-
spb_onprem/data/params/create_data.py,sha256=
|
|
56
|
+
spb_onprem/data/params/create_data.py,sha256=T3WhIfQUR0TZxY9o5dsM9yIJ6K7_gQ74fPjZv9f7Rao,1512
|
|
57
57
|
spb_onprem/data/params/data.py,sha256=ZPJRjCbkjOCV73NxlGm5DxbSaNOAztVBRZRE8FFQ9mw,779
|
|
58
58
|
spb_onprem/data/params/data_list.py,sha256=1pMIIYweBWx55Yvf2JWORfmBjzMCbGK_YYQEvT4CSSs,15193
|
|
59
59
|
spb_onprem/data/params/delete_annotation_version.py,sha256=R_jBVujor-09VS1Aa8yGP14R8nJ2Aa9OmmKezC4gz4c,457
|
|
60
60
|
spb_onprem/data/params/delete_data.py,sha256=D0tXTVbQogAhB49dHIxrX1r934kbtaJ_HOylJhLZVzA,324
|
|
61
|
-
spb_onprem/data/params/delete_prediction.py,sha256=X3sV2mrSUqg8FOlZYRtb0o1hAwFos48ydFK2Il8UCp4,479
|
|
62
61
|
spb_onprem/data/params/delete_scene.py,sha256=pD8TtS5Jm2uQC3F2EQ6-nAbQuQbJLG2pAwFqmsgucyM,478
|
|
63
62
|
spb_onprem/data/params/delete_slice_annotation_version.py,sha256=5M12bHKg9HJlh6hQ8XgLwFrfhTU7CiLM__gLZVBYrMg,595
|
|
64
63
|
spb_onprem/data/params/get_data_detail.py,sha256=7_aWRcHHsX0U2chl3CWrVLRUfzeoPzK8JtjwUGQdv0Y,388
|
|
65
|
-
spb_onprem/data/params/get_evaluation_value_list.py,sha256=zsnk5y2FrZXHbb8jIsxQ8BTTX9-HIAVXZe4B37mxvmk,1115
|
|
66
64
|
spb_onprem/data/params/insert_annotation_version.py,sha256=bxw9LndaDJ0DLBo8U8kkGctHz1ToEgD_UxWWVpmJpks,987
|
|
67
65
|
spb_onprem/data/params/insert_data_to_slice.py,sha256=_hLNC80wJbxGSouOpjwTY19mAf-itfRR4sxHnlLiiqk,478
|
|
68
|
-
spb_onprem/data/params/insert_prediction.py,sha256=68q5ZSSq4arAsozy1i52phkUoBfUSzNVVxCuygRYDfI,621
|
|
69
66
|
spb_onprem/data/params/insert_scene.py,sha256=n36XVbOlPc8MrFusOtXaXDHmG2Wa13ZnQX-0300b12E,774
|
|
70
67
|
spb_onprem/data/params/insert_slice_annotation_version.py,sha256=IRiwWbzIAcHWRiBNU-5F7qFCm4Cq78i2boWFSiAsR58,1052
|
|
71
68
|
spb_onprem/data/params/remove_data_from_slice.py,sha256=UjoQH0gTdm1nE1DafUmq3CP1nzHiCwDUnytQ6oBcZAA,478
|
|
@@ -134,7 +131,7 @@ spb_onprem/slices/params/update_slice.py,sha256=kryOmCnRTQ_OU0qDKgugppLrpeUpuLwm
|
|
|
134
131
|
spb_onprem/users/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
135
132
|
spb_onprem/users/entities/__init__.py,sha256=X8HZsCTlQnuPszok3AwI-i7bsQi0Ehul5L_2jZaol5E,57
|
|
136
133
|
spb_onprem/users/entities/auth.py,sha256=_KP-7yUErBxhJMm-dE3ObprPEG6e0JI2qNg6g8aK1qM,3371
|
|
137
|
-
superb_ai_onprem-0.
|
|
134
|
+
superb_ai_onprem-0.9.1.dist-info/licenses/LICENSE,sha256=CdinbFiHKGkGl6cPde6WgXhMuzyUXEG6tzy2-7udZ8o,1066
|
|
138
135
|
tests/__init__.py,sha256=Nqnn8clbgv-5l0PgxcTOldg8mkMKrFn4TvPL-rYUUGg,1
|
|
139
136
|
tests/activities/__init__.py,sha256=Nqnn8clbgv-5l0PgxcTOldg8mkMKrFn4TvPL-rYUUGg,1
|
|
140
137
|
tests/activities/real_test.py,sha256=0gQHg7rIEuZndGZyNHMWSD5nUZPMsUGigfCjWFxMthQ,1786
|
|
@@ -142,7 +139,7 @@ tests/activities/test_get_activity_history.py,sha256=gNLc4OQLgw9wqToRxV0y5REAHPu
|
|
|
142
139
|
tests/activities/test_params.py,sha256=P_k03Ll-We3gyFTeACalErP1UzwS2gB6ayIerKMMLEU,2335
|
|
143
140
|
tests/activities/test_service.py,sha256=8nijwzJlAFL9S0TqyuAvOJZzBvPPjxJbrj3EyziT_Ng,4407
|
|
144
141
|
tests/data/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
145
|
-
tests/data/test_data_service.py,sha256=
|
|
142
|
+
tests/data/test_data_service.py,sha256=DFIoI0ekAIDfv2k4FBGetOdMBZz68B6WyVmQygkMCec,9985
|
|
146
143
|
tests/datasets/__init__.py,sha256=nMsjhPXe9rU87gI_wasqCtz7SsTae2LzpUUnXXzS5zI,23
|
|
147
144
|
tests/datasets/test_dataset_service.py,sha256=RYY60U2TwKNv5JWzzkgUfP8ZgT5UYvgTYOl_fyp-Gek,4807
|
|
148
145
|
tests/exports/__init__.py,sha256=iBqr781TtnT1Tm5wLTCsdftpuRgQifIibxWrB_I7tiw,23
|
|
@@ -155,7 +152,7 @@ tests/models/__init__.py,sha256=Z2naiUgIjI-nHGsldwze1BqpV5JfDKTaBk-vg6_h6t4,21
|
|
|
155
152
|
tests/models/test_model_service.py,sha256=lQKFPHlfxhqcnrKHz6l2sGp53lpmC_kCHgQ-sXBbgMw,7556
|
|
156
153
|
tests/predictions/__init__.py,sha256=mFAXy0xOEXVYM7quYfIhwSih3kcEDdD4rLPq5G91Igg,26
|
|
157
154
|
tests/predictions/test_prediction_service.py,sha256=u2MYXNXSXKRAbv-Rz7sV0roitbD2h5U5ZIAaqeFMA1M,12632
|
|
158
|
-
superb_ai_onprem-0.
|
|
159
|
-
superb_ai_onprem-0.
|
|
160
|
-
superb_ai_onprem-0.
|
|
161
|
-
superb_ai_onprem-0.
|
|
155
|
+
superb_ai_onprem-0.9.1.dist-info/METADATA,sha256=XnYNxEQdA1w0MoijwLSEvUbyqliFEXTpcKaFsyiFNhU,9627
|
|
156
|
+
superb_ai_onprem-0.9.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
157
|
+
superb_ai_onprem-0.9.1.dist-info/top_level.txt,sha256=LbqU6FjWKaxO7FPS5-71e3OIS8VgBi5VrtQMWFOW25Q,17
|
|
158
|
+
superb_ai_onprem-0.9.1.dist-info/RECORD,,
|
tests/data/test_data_service.py
CHANGED
|
@@ -38,12 +38,6 @@ class TestDataService:
|
|
|
38
38
|
}
|
|
39
39
|
]
|
|
40
40
|
},
|
|
41
|
-
"predictions": [
|
|
42
|
-
{
|
|
43
|
-
"id": "prediction-1",
|
|
44
|
-
"content": {"id": "content-3"}
|
|
45
|
-
}
|
|
46
|
-
],
|
|
47
41
|
"thumbnail": {
|
|
48
42
|
"id": "thumbnail-1"
|
|
49
43
|
}
|
|
@@ -176,12 +170,6 @@ class TestDataService:
|
|
|
176
170
|
}
|
|
177
171
|
]
|
|
178
172
|
},
|
|
179
|
-
"predictions": [
|
|
180
|
-
{
|
|
181
|
-
"id": "prediction-1",
|
|
182
|
-
"content": {"id": "prediction-content-1"}
|
|
183
|
-
}
|
|
184
|
-
],
|
|
185
173
|
"thumbnail": {
|
|
186
174
|
"id": "thumbnail-complex"
|
|
187
175
|
}
|
|
@@ -197,7 +185,6 @@ class TestDataService:
|
|
|
197
185
|
assert result.id == data_id
|
|
198
186
|
assert len(result.scene) == 2
|
|
199
187
|
assert len(result.annotation.versions) == 2
|
|
200
|
-
assert len(result.predictions) == 1
|
|
201
188
|
assert result.thumbnail.id == "thumbnail-complex"
|
|
202
189
|
|
|
203
190
|
def test_get_data_detail_exception_handling(self):
|
|
@@ -213,204 +200,6 @@ class TestDataService:
|
|
|
213
200
|
|
|
214
201
|
self.data_service.request_gql.assert_called_once()
|
|
215
202
|
|
|
216
|
-
def test_get_evaluation_value_list_success(self):
|
|
217
|
-
"""Test successful evaluation value list retrieval."""
|
|
218
|
-
# Arrange
|
|
219
|
-
dataset_id = "dataset-123"
|
|
220
|
-
prediction_set_id = "pred-set-456"
|
|
221
|
-
filter_dict = {"score": {"min": 0.8}}
|
|
222
|
-
length = 25
|
|
223
|
-
cursor = "cursor-abc"
|
|
224
|
-
|
|
225
|
-
mock_response = {
|
|
226
|
-
"evaluationValueList": {
|
|
227
|
-
"totalCount": 100,
|
|
228
|
-
"next": "cursor-def",
|
|
229
|
-
"data": [
|
|
230
|
-
{"dataId": "data-1"},
|
|
231
|
-
{"dataId": "data-2"},
|
|
232
|
-
{"dataId": "data-3"}
|
|
233
|
-
]
|
|
234
|
-
}
|
|
235
|
-
}
|
|
236
|
-
self.data_service.request_gql.return_value = mock_response
|
|
237
|
-
|
|
238
|
-
# Act
|
|
239
|
-
result = self.data_service.get_evaluation_value_list(
|
|
240
|
-
dataset_id=dataset_id,
|
|
241
|
-
prediction_set_id=prediction_set_id,
|
|
242
|
-
filter=filter_dict,
|
|
243
|
-
length=length,
|
|
244
|
-
cursor=cursor
|
|
245
|
-
)
|
|
246
|
-
|
|
247
|
-
# Assert
|
|
248
|
-
expected_result = {
|
|
249
|
-
"totalCount": 100,
|
|
250
|
-
"next": "cursor-def",
|
|
251
|
-
"data": [
|
|
252
|
-
{"dataId": "data-1"},
|
|
253
|
-
{"dataId": "data-2"},
|
|
254
|
-
{"dataId": "data-3"}
|
|
255
|
-
]
|
|
256
|
-
}
|
|
257
|
-
assert result == expected_result
|
|
258
|
-
self.data_service.request_gql.assert_called_once_with(
|
|
259
|
-
Queries.GET_EVALUATION_VALUE_LIST,
|
|
260
|
-
Queries.GET_EVALUATION_VALUE_LIST["variables"](
|
|
261
|
-
dataset_id=dataset_id,
|
|
262
|
-
prediction_set_id=prediction_set_id,
|
|
263
|
-
filter=filter_dict,
|
|
264
|
-
length=length,
|
|
265
|
-
cursor=cursor
|
|
266
|
-
)
|
|
267
|
-
)
|
|
268
|
-
|
|
269
|
-
def test_get_evaluation_value_list_without_filter(self):
|
|
270
|
-
"""Test evaluation value list retrieval without filter."""
|
|
271
|
-
# Arrange
|
|
272
|
-
dataset_id = "dataset-123"
|
|
273
|
-
prediction_set_id = "pred-set-456"
|
|
274
|
-
|
|
275
|
-
mock_response = {
|
|
276
|
-
"evaluationValueList": {
|
|
277
|
-
"totalCount": 50,
|
|
278
|
-
"next": None,
|
|
279
|
-
"data": [{"dataId": "data-1"}]
|
|
280
|
-
}
|
|
281
|
-
}
|
|
282
|
-
self.data_service.request_gql.return_value = mock_response
|
|
283
|
-
|
|
284
|
-
# Act
|
|
285
|
-
result = self.data_service.get_evaluation_value_list(
|
|
286
|
-
dataset_id=dataset_id,
|
|
287
|
-
prediction_set_id=prediction_set_id
|
|
288
|
-
)
|
|
289
|
-
|
|
290
|
-
# Assert
|
|
291
|
-
assert result["totalCount"] == 50
|
|
292
|
-
assert result["next"] is None
|
|
293
|
-
assert len(result["data"]) == 1
|
|
294
|
-
|
|
295
|
-
def test_get_evaluation_value_list_missing_dataset_id(self):
|
|
296
|
-
"""Test evaluation value list with missing dataset_id."""
|
|
297
|
-
# Arrange
|
|
298
|
-
prediction_set_id = "pred-set-456"
|
|
299
|
-
|
|
300
|
-
# Act & Assert
|
|
301
|
-
with pytest.raises(BadParameterError, match="dataset_id is required"):
|
|
302
|
-
self.data_service.get_evaluation_value_list(
|
|
303
|
-
dataset_id=None,
|
|
304
|
-
prediction_set_id=prediction_set_id
|
|
305
|
-
)
|
|
306
|
-
|
|
307
|
-
def test_get_evaluation_value_list_missing_prediction_set_id(self):
|
|
308
|
-
"""Test evaluation value list with missing prediction_set_id."""
|
|
309
|
-
# Arrange
|
|
310
|
-
dataset_id = "dataset-123"
|
|
311
|
-
|
|
312
|
-
# Act & Assert
|
|
313
|
-
with pytest.raises(BadParameterError, match="prediction_set_id is required"):
|
|
314
|
-
self.data_service.get_evaluation_value_list(
|
|
315
|
-
dataset_id=dataset_id,
|
|
316
|
-
prediction_set_id=None
|
|
317
|
-
)
|
|
318
|
-
|
|
319
|
-
def test_get_evaluation_value_list_empty_response(self):
|
|
320
|
-
"""Test evaluation value list with empty response."""
|
|
321
|
-
# Arrange
|
|
322
|
-
dataset_id = "dataset-123"
|
|
323
|
-
prediction_set_id = "pred-set-456"
|
|
324
|
-
|
|
325
|
-
mock_response = {}
|
|
326
|
-
self.data_service.request_gql.return_value = mock_response
|
|
327
|
-
|
|
328
|
-
# Act
|
|
329
|
-
result = self.data_service.get_evaluation_value_list(
|
|
330
|
-
dataset_id=dataset_id,
|
|
331
|
-
prediction_set_id=prediction_set_id
|
|
332
|
-
)
|
|
333
|
-
|
|
334
|
-
# Assert
|
|
335
|
-
assert result == {}
|
|
336
|
-
|
|
337
|
-
def test_get_total_data_id_count_in_evaluation_value_success(self):
|
|
338
|
-
"""Test successful total count retrieval."""
|
|
339
|
-
# Arrange
|
|
340
|
-
dataset_id = "dataset-123"
|
|
341
|
-
prediction_set_id = "pred-set-456"
|
|
342
|
-
filter_dict = {"score": {"min": 0.8}}
|
|
343
|
-
|
|
344
|
-
mock_response = {
|
|
345
|
-
"evaluationValueList": {
|
|
346
|
-
"totalCount": 150,
|
|
347
|
-
"next": "cursor-abc",
|
|
348
|
-
"data": [{"dataId": "data-1"}]
|
|
349
|
-
}
|
|
350
|
-
}
|
|
351
|
-
self.data_service.request_gql.return_value = mock_response
|
|
352
|
-
|
|
353
|
-
# Act
|
|
354
|
-
result = self.data_service.get_total_data_id_count_in_evaluation_value(
|
|
355
|
-
dataset_id=dataset_id,
|
|
356
|
-
prediction_set_id=prediction_set_id,
|
|
357
|
-
filter=filter_dict
|
|
358
|
-
)
|
|
359
|
-
|
|
360
|
-
# Assert
|
|
361
|
-
assert result == 150
|
|
362
|
-
self.data_service.request_gql.assert_called_once_with(
|
|
363
|
-
Queries.GET_EVALUATION_VALUE_LIST,
|
|
364
|
-
Queries.GET_EVALUATION_VALUE_LIST["variables"](
|
|
365
|
-
dataset_id=dataset_id,
|
|
366
|
-
prediction_set_id=prediction_set_id,
|
|
367
|
-
filter=filter_dict,
|
|
368
|
-
length=1
|
|
369
|
-
)
|
|
370
|
-
)
|
|
371
|
-
|
|
372
|
-
def test_get_total_data_id_count_in_evaluation_value_zero_count(self):
|
|
373
|
-
"""Test total count retrieval with zero results."""
|
|
374
|
-
# Arrange
|
|
375
|
-
dataset_id = "dataset-123"
|
|
376
|
-
prediction_set_id = "pred-set-456"
|
|
377
|
-
|
|
378
|
-
mock_response = {
|
|
379
|
-
"evaluationValueList": {
|
|
380
|
-
"totalCount": 0,
|
|
381
|
-
"next": None,
|
|
382
|
-
"data": []
|
|
383
|
-
}
|
|
384
|
-
}
|
|
385
|
-
self.data_service.request_gql.return_value = mock_response
|
|
386
|
-
|
|
387
|
-
# Act
|
|
388
|
-
result = self.data_service.get_total_data_id_count_in_evaluation_value(
|
|
389
|
-
dataset_id=dataset_id,
|
|
390
|
-
prediction_set_id=prediction_set_id
|
|
391
|
-
)
|
|
392
|
-
|
|
393
|
-
# Assert
|
|
394
|
-
assert result == 0
|
|
395
|
-
|
|
396
|
-
def test_get_total_data_id_count_in_evaluation_value_missing_response(self):
|
|
397
|
-
"""Test total count retrieval with missing response fields."""
|
|
398
|
-
# Arrange
|
|
399
|
-
dataset_id = "dataset-123"
|
|
400
|
-
prediction_set_id = "pred-set-456"
|
|
401
|
-
|
|
402
|
-
mock_response = {}
|
|
403
|
-
self.data_service.request_gql.return_value = mock_response
|
|
404
|
-
|
|
405
|
-
# Act
|
|
406
|
-
result = self.data_service.get_total_data_id_count_in_evaluation_value(
|
|
407
|
-
dataset_id=dataset_id,
|
|
408
|
-
prediction_set_id=prediction_set_id
|
|
409
|
-
)
|
|
410
|
-
|
|
411
|
-
# Assert
|
|
412
|
-
assert result == 0
|
|
413
|
-
|
|
414
203
|
def test_delete_data_query_structure(self):
|
|
415
204
|
"""Test DELETE query structure and parameters."""
|
|
416
205
|
# Arrange
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
def delete_prediction_params (
|
|
4
|
-
dataset_id: str,
|
|
5
|
-
data_id: str,
|
|
6
|
-
set_id: str,
|
|
7
|
-
):
|
|
8
|
-
"""Delete prediction from selected data.
|
|
9
|
-
|
|
10
|
-
Args:
|
|
11
|
-
dataset_id (str): dataset id which the data belongs to
|
|
12
|
-
data_id (str): data id to be deleted
|
|
13
|
-
set_id (str): set id to be deleted
|
|
14
|
-
|
|
15
|
-
Returns:
|
|
16
|
-
dict: the params for graphql query
|
|
17
|
-
"""
|
|
18
|
-
return {
|
|
19
|
-
"dataset_id": dataset_id,
|
|
20
|
-
"data_id": data_id,
|
|
21
|
-
"set_id": set_id,
|
|
22
|
-
}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
from typing import Union
|
|
2
|
-
from spb_onprem.base_types import UndefinedType, Undefined
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
def get_evaluation_value_list_params(
|
|
6
|
-
dataset_id: str,
|
|
7
|
-
prediction_set_id: str,
|
|
8
|
-
filter: Union[UndefinedType, dict] = Undefined,
|
|
9
|
-
length: int = 50,
|
|
10
|
-
cursor: Union[UndefinedType, str] = Undefined
|
|
11
|
-
):
|
|
12
|
-
"""Generate variables for get evaluation value list GraphQL query.
|
|
13
|
-
|
|
14
|
-
Args:
|
|
15
|
-
dataset_id (str): The ID of the dataset.
|
|
16
|
-
prediction_set_id (str): The ID of the prediction set.
|
|
17
|
-
filter (Union[UndefinedType, dict], optional): Diagnosis filter for evaluation values.
|
|
18
|
-
length (int): Number of items to retrieve per page.
|
|
19
|
-
cursor (Union[UndefinedType, str], optional): Cursor for pagination.
|
|
20
|
-
|
|
21
|
-
Returns:
|
|
22
|
-
dict: Variables dictionary for the GraphQL query.
|
|
23
|
-
"""
|
|
24
|
-
params = {
|
|
25
|
-
"datasetId": dataset_id,
|
|
26
|
-
"predictionSetId": prediction_set_id,
|
|
27
|
-
"length": length
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
if filter is not Undefined:
|
|
31
|
-
params["filter"] = filter
|
|
32
|
-
|
|
33
|
-
if cursor is not Undefined:
|
|
34
|
-
params["cursor"] = cursor
|
|
35
|
-
|
|
36
|
-
return params
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
from spb_onprem.data.entities import Prediction
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
def insert_prediction_params (
|
|
5
|
-
dataset_id: str,
|
|
6
|
-
data_id: str,
|
|
7
|
-
prediction: Prediction,
|
|
8
|
-
):
|
|
9
|
-
"""Insert prediction to selected data.
|
|
10
|
-
|
|
11
|
-
Args:
|
|
12
|
-
dataset_id (str): dataset id which the data belongs to
|
|
13
|
-
data_id (str): data id to be inserted
|
|
14
|
-
prediction (Prediction): prediction to be inserted
|
|
15
|
-
|
|
16
|
-
Returns:
|
|
17
|
-
dict: the params for graphql query
|
|
18
|
-
"""
|
|
19
|
-
return {
|
|
20
|
-
"dataset_id": dataset_id,
|
|
21
|
-
"data_id": data_id,
|
|
22
|
-
"prediction": prediction.model_dump(
|
|
23
|
-
by_alias=True, exclude_unset=True
|
|
24
|
-
),
|
|
25
|
-
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|