vaapi 0.7.28__tar.gz → 0.7.30__tar.gz
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.
- {vaapi-0.7.28/vaapi.egg-info → vaapi-0.7.30}/PKG-INFO +1 -1
- {vaapi-0.7.28 → vaapi-0.7.30}/vaapi/__init__.py +1 -1
- {vaapi-0.7.28 → vaapi-0.7.30}/vaapi/base_client.py +0 -4
- {vaapi-0.7.28 → vaapi-0.7.30}/vaapi/image/client.py +1 -1
- {vaapi-0.7.28 → vaapi-0.7.30/vaapi.egg-info}/PKG-INFO +1 -1
- {vaapi-0.7.28 → vaapi-0.7.30}/vaapi.egg-info/SOURCES.txt +0 -4
- vaapi-0.7.28/vaapi/annotations/client.py +0 -206
- vaapi-0.7.28/vaapi/frame_filter/client.py +0 -181
- vaapi-0.7.28/vaapi/xabsl_symbol_complete/__init__.py +0 -0
- vaapi-0.7.28/vaapi/xabsl_symbol_sparse/__init__.py +0 -0
- {vaapi-0.7.28 → vaapi-0.7.30}/.github/workflows/deploy_sdk.yml +0 -0
- {vaapi-0.7.28 → vaapi-0.7.30}/.gitignore +0 -0
- {vaapi-0.7.28 → vaapi-0.7.30}/README.md +0 -0
- {vaapi-0.7.28 → vaapi-0.7.30}/examples/README.md +0 -0
- {vaapi-0.7.28 → vaapi-0.7.30}/examples/annotation_demo.py +0 -0
- {vaapi-0.7.28 → vaapi-0.7.30}/examples/ballcanditates.py +0 -0
- {vaapi-0.7.28 → vaapi-0.7.30}/examples/basics.py +0 -0
- {vaapi-0.7.28 → vaapi-0.7.30}/examples/behavior_demo.py +0 -0
- {vaapi-0.7.28 → vaapi-0.7.30}/examples/broken_demos/annotation_example.py +0 -0
- {vaapi-0.7.28 → vaapi-0.7.30}/examples/broken_demos/find_kicks_near_goal.py +0 -0
- {vaapi-0.7.28 → vaapi-0.7.30}/examples/broken_demos/frame_filter_example.py +0 -0
- {vaapi-0.7.28 → vaapi-0.7.30}/examples/broken_demos/frame_times.py +0 -0
- {vaapi-0.7.28 → vaapi-0.7.30}/examples/broken_demos/heatmap.py +0 -0
- {vaapi-0.7.28 → vaapi-0.7.30}/examples/bulk_image_update.py +0 -0
- {vaapi-0.7.28 → vaapi-0.7.30}/examples/file_upload.py +0 -0
- {vaapi-0.7.28 → vaapi-0.7.30}/examples/filter_behavior_demo.py +0 -0
- {vaapi-0.7.28 → vaapi-0.7.30}/examples/fix_images.py +0 -0
- {vaapi-0.7.28 → vaapi-0.7.30}/examples/get_annotations.py +0 -0
- {vaapi-0.7.28 → vaapi-0.7.30}/examples/get_frame_per_video_timestamp.py +0 -0
- {vaapi-0.7.28 → vaapi-0.7.30}/examples/get_game_model_data.py +0 -0
- {vaapi-0.7.28 → vaapi-0.7.30}/examples/get_image.py +0 -0
- {vaapi-0.7.28 → vaapi-0.7.30}/examples/get_log_model_data.py +0 -0
- {vaapi-0.7.28 → vaapi-0.7.30}/examples/get_teams.py +0 -0
- {vaapi-0.7.28 → vaapi-0.7.30}/examples/get_video_model_data.py +0 -0
- {vaapi-0.7.28 → vaapi-0.7.30}/examples/image_demo.py +0 -0
- {vaapi-0.7.28 → vaapi-0.7.30}/examples/image_pagination.py +0 -0
- {vaapi-0.7.28 → vaapi-0.7.30}/examples/imu_demo.py +0 -0
- {vaapi-0.7.28 → vaapi-0.7.30}/examples/mmap_local_demo.py +0 -0
- {vaapi-0.7.28 → vaapi-0.7.30}/examples/num_kicks_demo.py +0 -0
- {vaapi-0.7.28 → vaapi-0.7.30}/examples/num_kicks_demo_interactive.py +0 -0
- {vaapi-0.7.28 → vaapi-0.7.30}/examples/requirements.txt +0 -0
- {vaapi-0.7.28 → vaapi-0.7.30}/examples/robot.py +0 -0
- {vaapi-0.7.28 → vaapi-0.7.30}/examples/slice.py +0 -0
- {vaapi-0.7.28 → vaapi-0.7.30}/examples/team_demo.py +0 -0
- {vaapi-0.7.28 → vaapi-0.7.30}/package_pypi.sh +0 -0
- {vaapi-0.7.28 → vaapi-0.7.30}/pyproject.toml +0 -0
- {vaapi-0.7.28 → vaapi-0.7.30}/renovate.json +0 -0
- {vaapi-0.7.28 → vaapi-0.7.30}/setup.cfg +0 -0
- {vaapi-0.7.28 → vaapi-0.7.30}/tests/run_tests.py +0 -0
- {vaapi-0.7.28 → vaapi-0.7.30}/tests/tests/cognition_repr_test.py +0 -0
- {vaapi-0.7.28 → vaapi-0.7.30}/tests/tests/event_tests.py +0 -0
- {vaapi-0.7.28 → vaapi-0.7.30}/tests/tests/game_tests.py +0 -0
- {vaapi-0.7.28 → vaapi-0.7.30}/tests/tests/logs_tests.py +0 -0
- {vaapi-0.7.28 → vaapi-0.7.30}/tests/tests/motion_repr_test.py +0 -0
- {vaapi-0.7.28/vaapi/annotations → vaapi-0.7.30/vaapi/behavior_frame_option}/__init__.py +0 -0
- {vaapi-0.7.28 → vaapi-0.7.30}/vaapi/behavior_frame_option/client.py +0 -0
- {vaapi-0.7.28/vaapi/behavior_frame_option → vaapi-0.7.30/vaapi/behavior_options}/__init__.py +0 -0
- {vaapi-0.7.28 → vaapi-0.7.30}/vaapi/behavior_options/client.py +0 -0
- {vaapi-0.7.28/vaapi/behavior_options → vaapi-0.7.30/vaapi/behavior_options_state}/__init__.py +0 -0
- {vaapi-0.7.28 → vaapi-0.7.30}/vaapi/behavior_options_state/client.py +0 -0
- {vaapi-0.7.28 → vaapi-0.7.30}/vaapi/client.py +0 -0
- {vaapi-0.7.28/vaapi/behavior_options_state → vaapi-0.7.30/vaapi/cognition_frame}/__init__.py +0 -0
- {vaapi-0.7.28 → vaapi-0.7.30}/vaapi/cognition_frame/client.py +0 -0
- {vaapi-0.7.28/vaapi/cognition_frame → vaapi-0.7.30/vaapi/cognition_representation}/__init__.py +0 -0
- {vaapi-0.7.28 → vaapi-0.7.30}/vaapi/cognition_representation/client.py +0 -0
- {vaapi-0.7.28 → vaapi-0.7.30}/vaapi/core/api_error.py +0 -0
- {vaapi-0.7.28 → vaapi-0.7.30}/vaapi/core/client_wrapper.py +0 -0
- {vaapi-0.7.28 → vaapi-0.7.30}/vaapi/core/datetime_utils.py +0 -0
- {vaapi-0.7.28 → vaapi-0.7.30}/vaapi/core/file.py +0 -0
- {vaapi-0.7.28 → vaapi-0.7.30}/vaapi/core/http_client.py +0 -0
- {vaapi-0.7.28 → vaapi-0.7.30}/vaapi/core/jsonable_encoder.py +0 -0
- {vaapi-0.7.28 → vaapi-0.7.30}/vaapi/core/pagination.py +0 -0
- {vaapi-0.7.28 → vaapi-0.7.30}/vaapi/core/pydantic_utilities.py +0 -0
- {vaapi-0.7.28 → vaapi-0.7.30}/vaapi/core/query_encoder.py +0 -0
- {vaapi-0.7.28 → vaapi-0.7.30}/vaapi/core/remove_none_from_dict.py +0 -0
- {vaapi-0.7.28 → vaapi-0.7.30}/vaapi/core/request_options.py +0 -0
- {vaapi-0.7.28/vaapi/cognition_representation → vaapi-0.7.30/vaapi/events}/__init__.py +0 -0
- {vaapi-0.7.28 → vaapi-0.7.30}/vaapi/events/client.py +0 -0
- {vaapi-0.7.28/vaapi/events → vaapi-0.7.30/vaapi/experiment}/__init__.py +0 -0
- {vaapi-0.7.28 → vaapi-0.7.30}/vaapi/experiment/client.py +0 -0
- {vaapi-0.7.28/vaapi/experiment → vaapi-0.7.30/vaapi/game}/__init__.py +0 -0
- {vaapi-0.7.28 → vaapi-0.7.30}/vaapi/game/client.py +0 -0
- {vaapi-0.7.28/vaapi/frame_filter → vaapi-0.7.30/vaapi/image}/__init__.py +0 -0
- {vaapi-0.7.28/vaapi/game → vaapi-0.7.30/vaapi/log_status}/__init__.py +0 -0
- {vaapi-0.7.28 → vaapi-0.7.30}/vaapi/log_status/client.py +0 -0
- {vaapi-0.7.28/vaapi/image → vaapi-0.7.30/vaapi/logs}/__init__.py +0 -0
- {vaapi-0.7.28 → vaapi-0.7.30}/vaapi/logs/client.py +0 -0
- {vaapi-0.7.28/vaapi/log_status → vaapi-0.7.30/vaapi/motion_frame}/__init__.py +0 -0
- {vaapi-0.7.28 → vaapi-0.7.30}/vaapi/motion_frame/client.py +0 -0
- {vaapi-0.7.28/vaapi/logs → vaapi-0.7.30/vaapi/motion_representation}/__init__.py +0 -0
- {vaapi-0.7.28 → vaapi-0.7.30}/vaapi/motion_representation/client.py +0 -0
- {vaapi-0.7.28/vaapi/motion_frame → vaapi-0.7.30/vaapi/robots}/__init__.py +0 -0
- {vaapi-0.7.28 → vaapi-0.7.30}/vaapi/robots/client.py +0 -0
- {vaapi-0.7.28/vaapi/motion_representation → vaapi-0.7.30/vaapi/teams}/__init__.py +0 -0
- {vaapi-0.7.28 → vaapi-0.7.30}/vaapi/teams/client.py +0 -0
- {vaapi-0.7.28/vaapi/robots → vaapi-0.7.30/vaapi/timeline}/__init__.py +0 -0
- {vaapi-0.7.28 → vaapi-0.7.30}/vaapi/timeline/client.py +0 -0
- {vaapi-0.7.28 → vaapi-0.7.30}/vaapi/types/annotation.py +0 -0
- {vaapi-0.7.28 → vaapi-0.7.30}/vaapi/types/behavior_option.py +0 -0
- {vaapi-0.7.28 → vaapi-0.7.30}/vaapi/types/behavior_option_state.py +0 -0
- {vaapi-0.7.28 → vaapi-0.7.30}/vaapi/types/behaviorframe_options.py +0 -0
- {vaapi-0.7.28 → vaapi-0.7.30}/vaapi/types/cognition_frame.py +0 -0
- {vaapi-0.7.28 → vaapi-0.7.30}/vaapi/types/cognition_representation.py +0 -0
- {vaapi-0.7.28 → vaapi-0.7.30}/vaapi/types/event.py +0 -0
- {vaapi-0.7.28 → vaapi-0.7.30}/vaapi/types/experiment.py +0 -0
- {vaapi-0.7.28 → vaapi-0.7.30}/vaapi/types/frame_filter.py +0 -0
- {vaapi-0.7.28 → vaapi-0.7.30}/vaapi/types/game.py +0 -0
- {vaapi-0.7.28 → vaapi-0.7.30}/vaapi/types/image.py +0 -0
- {vaapi-0.7.28 → vaapi-0.7.30}/vaapi/types/log.py +0 -0
- {vaapi-0.7.28 → vaapi-0.7.30}/vaapi/types/log_status.py +0 -0
- {vaapi-0.7.28 → vaapi-0.7.30}/vaapi/types/motion_frame.py +0 -0
- {vaapi-0.7.28 → vaapi-0.7.30}/vaapi/types/motion_representation.py +0 -0
- {vaapi-0.7.28 → vaapi-0.7.30}/vaapi/types/robots.py +0 -0
- {vaapi-0.7.28 → vaapi-0.7.30}/vaapi/types/teams.py +0 -0
- {vaapi-0.7.28 → vaapi-0.7.30}/vaapi/types/timeline.py +0 -0
- {vaapi-0.7.28 → vaapi-0.7.30}/vaapi/types/video.py +0 -0
- {vaapi-0.7.28 → vaapi-0.7.30}/vaapi/types/xabsl_symbol_complete.py +0 -0
- {vaapi-0.7.28 → vaapi-0.7.30}/vaapi/types/xabsl_symbol_sparse.py +0 -0
- {vaapi-0.7.28/vaapi/teams → vaapi-0.7.30/vaapi/videos}/__init__.py +0 -0
- {vaapi-0.7.28 → vaapi-0.7.30}/vaapi/videos/client.py +0 -0
- {vaapi-0.7.28/vaapi/timeline → vaapi-0.7.30/vaapi/xabsl_symbol_complete}/__init__.py +0 -0
- {vaapi-0.7.28 → vaapi-0.7.30}/vaapi/xabsl_symbol_complete/client.py +0 -0
- {vaapi-0.7.28/vaapi/videos → vaapi-0.7.30/vaapi/xabsl_symbol_sparse}/__init__.py +0 -0
- {vaapi-0.7.28 → vaapi-0.7.30}/vaapi/xabsl_symbol_sparse/client.py +0 -0
- {vaapi-0.7.28 → vaapi-0.7.30}/vaapi.egg-info/dependency_links.txt +0 -0
- {vaapi-0.7.28 → vaapi-0.7.30}/vaapi.egg-info/requires.txt +0 -0
- {vaapi-0.7.28 → vaapi-0.7.30}/vaapi.egg-info/top_level.txt +0 -0
|
@@ -4,7 +4,6 @@ import httpx
|
|
|
4
4
|
|
|
5
5
|
from .core.api_error import ApiError
|
|
6
6
|
from .core.client_wrapper import SyncClientWrapper
|
|
7
|
-
from .annotations.client import AnnotationsClient
|
|
8
7
|
from .events.client import EventsClient
|
|
9
8
|
from .game.client import GameClient
|
|
10
9
|
from .logs.client import LogClient
|
|
@@ -17,7 +16,6 @@ from .image.client import ImageClient
|
|
|
17
16
|
from .xabsl_symbol_complete.client import XabslSymbolClientComplete
|
|
18
17
|
from .xabsl_symbol_sparse.client import XabslSymbolClientSparse
|
|
19
18
|
from .log_status.client import LogStatusClient
|
|
20
|
-
from .frame_filter.client import FrameFilterClient
|
|
21
19
|
from .experiment.client import ExperimentClient
|
|
22
20
|
from .motion_frame.client import MotionFrameClient
|
|
23
21
|
from .cognition_frame.client import CognitionFrameClient
|
|
@@ -125,7 +123,6 @@ class VaapiBase:
|
|
|
125
123
|
),
|
|
126
124
|
timeout=_defaulted_timeout,
|
|
127
125
|
)
|
|
128
|
-
self.annotations = AnnotationsClient(client_wrapper=self._client_wrapper)
|
|
129
126
|
self.events = EventsClient(client_wrapper=self._client_wrapper)
|
|
130
127
|
self.games = GameClient(client_wrapper=self._client_wrapper)
|
|
131
128
|
self.logs = LogClient(client_wrapper=self._client_wrapper)
|
|
@@ -147,7 +144,6 @@ class VaapiBase:
|
|
|
147
144
|
client_wrapper=self._client_wrapper
|
|
148
145
|
)
|
|
149
146
|
self.log_status = LogStatusClient(client_wrapper=self._client_wrapper)
|
|
150
|
-
self.frame_filter = FrameFilterClient(client_wrapper=self._client_wrapper)
|
|
151
147
|
self.experiment = ExperimentClient(client_wrapper=self._client_wrapper)
|
|
152
148
|
self.team = TeamClient(client_wrapper=self._client_wrapper)
|
|
153
149
|
self.robot = RobotClient(client_wrapper=self._client_wrapper)
|
|
@@ -49,8 +49,6 @@ vaapi.egg-info/SOURCES.txt
|
|
|
49
49
|
vaapi.egg-info/dependency_links.txt
|
|
50
50
|
vaapi.egg-info/requires.txt
|
|
51
51
|
vaapi.egg-info/top_level.txt
|
|
52
|
-
vaapi/annotations/__init__.py
|
|
53
|
-
vaapi/annotations/client.py
|
|
54
52
|
vaapi/behavior_frame_option/__init__.py
|
|
55
53
|
vaapi/behavior_frame_option/client.py
|
|
56
54
|
vaapi/behavior_options/__init__.py
|
|
@@ -76,8 +74,6 @@ vaapi/events/__init__.py
|
|
|
76
74
|
vaapi/events/client.py
|
|
77
75
|
vaapi/experiment/__init__.py
|
|
78
76
|
vaapi/experiment/client.py
|
|
79
|
-
vaapi/frame_filter/__init__.py
|
|
80
|
-
vaapi/frame_filter/client.py
|
|
81
77
|
vaapi/game/__init__.py
|
|
82
78
|
vaapi/game/client.py
|
|
83
79
|
vaapi/image/__init__.py
|
|
@@ -1,206 +0,0 @@
|
|
|
1
|
-
import typing
|
|
2
|
-
from json.decoder import JSONDecodeError
|
|
3
|
-
|
|
4
|
-
from ..core.api_error import ApiError
|
|
5
|
-
from ..core.client_wrapper import SyncClientWrapper
|
|
6
|
-
from ..core.jsonable_encoder import jsonable_encoder
|
|
7
|
-
from ..core.pydantic_utilities import pydantic_v1
|
|
8
|
-
from ..core.request_options import RequestOptions
|
|
9
|
-
from ..types.annotation import Annotation
|
|
10
|
-
|
|
11
|
-
# this is used as the default value for optional parameters
|
|
12
|
-
OMIT = typing.cast(typing.Any, ...)
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
class AnnotationsClient:
|
|
16
|
-
def __init__(self, *, client_wrapper: SyncClientWrapper):
|
|
17
|
-
self._client_wrapper = client_wrapper
|
|
18
|
-
|
|
19
|
-
def get(
|
|
20
|
-
self, id: int, *, request_options: typing.Optional[RequestOptions] = None
|
|
21
|
-
) -> Annotation:
|
|
22
|
-
_response = self._client_wrapper.httpx_client.request(
|
|
23
|
-
f"api/annotations/{jsonable_encoder(id)}/",
|
|
24
|
-
method="GET",
|
|
25
|
-
request_options=request_options,
|
|
26
|
-
)
|
|
27
|
-
try:
|
|
28
|
-
if 200 <= _response.status_code < 300:
|
|
29
|
-
return pydantic_v1.parse_obj_as(Annotation, _response.json()) # type: ignore
|
|
30
|
-
_response_json = _response.json()
|
|
31
|
-
except JSONDecodeError:
|
|
32
|
-
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
33
|
-
raise ApiError(status_code=_response.status_code, body=_response_json)
|
|
34
|
-
|
|
35
|
-
def delete(
|
|
36
|
-
self, id: int, *, request_options: typing.Optional[RequestOptions] = None
|
|
37
|
-
) -> None:
|
|
38
|
-
"""
|
|
39
|
-
Delete an annotation.
|
|
40
|
-
|
|
41
|
-
<Warning>This action can't be undone!</Warning>
|
|
42
|
-
|
|
43
|
-
You will need to supply the annotation's unique ID. You can find the ID in the Label Studio UI listed at the top of the annotation in its tab. It is also listed in the History panel when viewing the annotation. Or you can use [Get all task annotations](list) to find all annotation IDs.
|
|
44
|
-
|
|
45
|
-
Parameters
|
|
46
|
-
----------
|
|
47
|
-
id : int
|
|
48
|
-
A unique integer value identifying this annotation.
|
|
49
|
-
|
|
50
|
-
request_options : typing.Optional[RequestOptions]
|
|
51
|
-
Request-specific configuration.
|
|
52
|
-
|
|
53
|
-
Returns
|
|
54
|
-
-------
|
|
55
|
-
None
|
|
56
|
-
|
|
57
|
-
Examples
|
|
58
|
-
--------
|
|
59
|
-
from label_studio_sdk.client import LabelStudio
|
|
60
|
-
|
|
61
|
-
client = LabelStudio(
|
|
62
|
-
api_key="YOUR_API_KEY",
|
|
63
|
-
)
|
|
64
|
-
client.annotations.delete(
|
|
65
|
-
id=1,
|
|
66
|
-
)
|
|
67
|
-
"""
|
|
68
|
-
_response = self._client_wrapper.httpx_client.request(
|
|
69
|
-
f"api/annotations/{jsonable_encoder(id)}/",
|
|
70
|
-
method="DELETE",
|
|
71
|
-
request_options=request_options,
|
|
72
|
-
)
|
|
73
|
-
try:
|
|
74
|
-
if 200 <= _response.status_code < 300:
|
|
75
|
-
return
|
|
76
|
-
_response_json = _response.json()
|
|
77
|
-
except JSONDecodeError:
|
|
78
|
-
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
79
|
-
raise ApiError(status_code=_response.status_code, body=_response_json)
|
|
80
|
-
|
|
81
|
-
def update(
|
|
82
|
-
self,
|
|
83
|
-
id: int,
|
|
84
|
-
*,
|
|
85
|
-
class_name: typing.Optional[str] = OMIT,
|
|
86
|
-
concealed: typing.Optional[bool] = OMIT,
|
|
87
|
-
is_empty: typing.Optional[bool] = OMIT,
|
|
88
|
-
validated: typing.Optional[bool] = OMIT,
|
|
89
|
-
data: typing.Optional[typing.Dict[str, typing.Any]] = OMIT,
|
|
90
|
-
request_options: typing.Optional[RequestOptions] = None,
|
|
91
|
-
) -> Annotation:
|
|
92
|
-
""" """
|
|
93
|
-
_response = self._client_wrapper.httpx_client.request(
|
|
94
|
-
f"api/annotations/{jsonable_encoder(id)}/",
|
|
95
|
-
method="PATCH",
|
|
96
|
-
json={
|
|
97
|
-
"class_name": class_name,
|
|
98
|
-
"concealed": concealed,
|
|
99
|
-
"is_empty": is_empty,
|
|
100
|
-
"validated": validated,
|
|
101
|
-
"data": data,
|
|
102
|
-
},
|
|
103
|
-
request_options=request_options,
|
|
104
|
-
omit=OMIT,
|
|
105
|
-
)
|
|
106
|
-
try:
|
|
107
|
-
if 200 <= _response.status_code < 300:
|
|
108
|
-
return pydantic_v1.parse_obj_as(Annotation, _response.json()) # type: ignore
|
|
109
|
-
_response_json = _response.json()
|
|
110
|
-
except JSONDecodeError:
|
|
111
|
-
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
112
|
-
raise ApiError(status_code=_response.status_code, body=_response_json)
|
|
113
|
-
|
|
114
|
-
def list(
|
|
115
|
-
self,
|
|
116
|
-
*,
|
|
117
|
-
request_options: typing.Optional[RequestOptions] = None,
|
|
118
|
-
**filters: typing.Any,
|
|
119
|
-
) -> typing.List[Annotation]:
|
|
120
|
-
"""
|
|
121
|
-
TODO: think about when it makes sense to use list for annotations:
|
|
122
|
-
- kind of only makes sense for statistics on annotations.
|
|
123
|
-
"""
|
|
124
|
-
query_params = {k: v for k, v in filters.items()}
|
|
125
|
-
_response = self._client_wrapper.httpx_client.request(
|
|
126
|
-
"api/annotations/",
|
|
127
|
-
method="GET",
|
|
128
|
-
request_options=request_options,
|
|
129
|
-
params=query_params,
|
|
130
|
-
)
|
|
131
|
-
|
|
132
|
-
try:
|
|
133
|
-
if 200 <= _response.status_code < 300:
|
|
134
|
-
return pydantic_v1.parse_obj_as(
|
|
135
|
-
typing.List[Annotation], _response.json()
|
|
136
|
-
) # type: ignore
|
|
137
|
-
_response_json = _response.json()
|
|
138
|
-
except JSONDecodeError:
|
|
139
|
-
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
140
|
-
raise ApiError(status_code=_response.status_code, body=_response_json)
|
|
141
|
-
|
|
142
|
-
def create(
|
|
143
|
-
self,
|
|
144
|
-
image_id,
|
|
145
|
-
type,
|
|
146
|
-
class_name,
|
|
147
|
-
*,
|
|
148
|
-
concealed: typing.Optional[bool] = OMIT,
|
|
149
|
-
is_empty: typing.Optional[bool] = OMIT,
|
|
150
|
-
data: typing.Optional[typing.Dict[str, typing.Any]] = OMIT,
|
|
151
|
-
request_options: typing.Optional[RequestOptions] = None,
|
|
152
|
-
) -> Annotation:
|
|
153
|
-
""" """
|
|
154
|
-
_response = self._client_wrapper.httpx_client.request(
|
|
155
|
-
"api/annotations/",
|
|
156
|
-
method="POST",
|
|
157
|
-
json={
|
|
158
|
-
"image": image_id,
|
|
159
|
-
"type": type,
|
|
160
|
-
"class_name": class_name,
|
|
161
|
-
"concealed": concealed,
|
|
162
|
-
"is_empty": is_empty,
|
|
163
|
-
"data": data,
|
|
164
|
-
},
|
|
165
|
-
request_options=request_options,
|
|
166
|
-
omit=OMIT,
|
|
167
|
-
)
|
|
168
|
-
try:
|
|
169
|
-
if 200 <= _response.status_code < 300:
|
|
170
|
-
return pydantic_v1.parse_obj_as(Annotation, _response.json()) # type: ignore
|
|
171
|
-
_response_json = _response.json()
|
|
172
|
-
except JSONDecodeError:
|
|
173
|
-
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
174
|
-
raise ApiError(status_code=_response.status_code, body=_response_json)
|
|
175
|
-
|
|
176
|
-
def count(
|
|
177
|
-
self,
|
|
178
|
-
request_options: typing.Optional[RequestOptions] = None,
|
|
179
|
-
**filters: typing.Any,
|
|
180
|
-
) -> typing.Optional[int]:
|
|
181
|
-
"""
|
|
182
|
-
Examples
|
|
183
|
-
--------
|
|
184
|
-
from vaapi.client import Vaapi
|
|
185
|
-
|
|
186
|
-
client = Vaapi(
|
|
187
|
-
base_url='https://vat.berlin-united.com/',
|
|
188
|
-
api_key="YOUR_API_KEY",
|
|
189
|
-
)
|
|
190
|
-
"""
|
|
191
|
-
query_params = {k: v for k, v in filters.items() if v is not None}
|
|
192
|
-
_response = self._client_wrapper.httpx_client.request(
|
|
193
|
-
"api/annotation-count/",
|
|
194
|
-
method="GET",
|
|
195
|
-
request_options=request_options,
|
|
196
|
-
params=query_params,
|
|
197
|
-
)
|
|
198
|
-
try:
|
|
199
|
-
if 200 <= _response.status_code < 300:
|
|
200
|
-
return pydantic_v1.parse_obj_as(
|
|
201
|
-
typing.Dict[str, typing.Any], _response.json()
|
|
202
|
-
) # type: ignore
|
|
203
|
-
_response_json = _response.json()
|
|
204
|
-
except JSONDecodeError:
|
|
205
|
-
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
206
|
-
raise ApiError(status_code=_response.status_code, body=_response_json)
|
|
@@ -1,181 +0,0 @@
|
|
|
1
|
-
import typing
|
|
2
|
-
from json.decoder import JSONDecodeError
|
|
3
|
-
|
|
4
|
-
from ..core.api_error import ApiError
|
|
5
|
-
from ..core.client_wrapper import SyncClientWrapper
|
|
6
|
-
from ..core.jsonable_encoder import jsonable_encoder
|
|
7
|
-
from ..core.pydantic_utilities import pydantic_v1
|
|
8
|
-
from ..core.request_options import RequestOptions
|
|
9
|
-
from ..types.frame_filter import FrameFilter
|
|
10
|
-
|
|
11
|
-
# this is used as the default value for optional parameters
|
|
12
|
-
OMIT = typing.cast(typing.Any, ...)
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
class FrameFilterClient:
|
|
16
|
-
def __init__(self, *, client_wrapper: SyncClientWrapper):
|
|
17
|
-
self._client_wrapper = client_wrapper
|
|
18
|
-
|
|
19
|
-
def get(
|
|
20
|
-
self, id: int, *, request_options: typing.Optional[RequestOptions] = None
|
|
21
|
-
) -> FrameFilter:
|
|
22
|
-
"""
|
|
23
|
-
Examples
|
|
24
|
-
--------
|
|
25
|
-
from vaapi.client import Vaapi
|
|
26
|
-
|
|
27
|
-
client = Vaapi(
|
|
28
|
-
base_url='https://vat.berlin-united.com/',
|
|
29
|
-
api_key="YOUR_API_KEY",
|
|
30
|
-
)
|
|
31
|
-
"""
|
|
32
|
-
_response = self._client_wrapper.httpx_client.request(
|
|
33
|
-
f"api/frame-filter/{jsonable_encoder(id)}/",
|
|
34
|
-
method="GET",
|
|
35
|
-
request_options=request_options,
|
|
36
|
-
)
|
|
37
|
-
try:
|
|
38
|
-
if 200 <= _response.status_code < 300:
|
|
39
|
-
return pydantic_v1.parse_obj_as(FrameFilter, _response.json()) # type: ignore
|
|
40
|
-
_response_json = _response.json()
|
|
41
|
-
|
|
42
|
-
except JSONDecodeError:
|
|
43
|
-
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
44
|
-
raise ApiError(status_code=_response.status_code, body=_response_json)
|
|
45
|
-
|
|
46
|
-
def delete(
|
|
47
|
-
self, id: int, *, request_options: typing.Optional[RequestOptions] = None
|
|
48
|
-
) -> None:
|
|
49
|
-
"""
|
|
50
|
-
Delete the log status for one log.
|
|
51
|
-
|
|
52
|
-
<Warning>This action can't be undone!</Warning>
|
|
53
|
-
|
|
54
|
-
You will need to supply the logs's unique ID. You can find the ID in
|
|
55
|
-
the django admin panel or in the log settings in the UI.
|
|
56
|
-
Parameters
|
|
57
|
-
----------
|
|
58
|
-
id : int
|
|
59
|
-
A unique integer value identifying this annotation.
|
|
60
|
-
|
|
61
|
-
request_options : typing.Optional[RequestOptions]
|
|
62
|
-
Request-specific configuration.
|
|
63
|
-
|
|
64
|
-
Returns
|
|
65
|
-
-------
|
|
66
|
-
None
|
|
67
|
-
|
|
68
|
-
Examples
|
|
69
|
-
--------
|
|
70
|
-
from vaapi.client import Vaapi
|
|
71
|
-
|
|
72
|
-
client = Vaapi(
|
|
73
|
-
base_url='https://vat.berlin-united.com/',
|
|
74
|
-
api_key="YOUR_API_KEY",
|
|
75
|
-
)
|
|
76
|
-
client.annotations.delete(
|
|
77
|
-
id=1,
|
|
78
|
-
)
|
|
79
|
-
"""
|
|
80
|
-
_response = self._client_wrapper.httpx_client.request(
|
|
81
|
-
f"api/frame-filter/{jsonable_encoder(id)}/",
|
|
82
|
-
method="DELETE",
|
|
83
|
-
request_options=request_options,
|
|
84
|
-
)
|
|
85
|
-
try:
|
|
86
|
-
if 200 <= _response.status_code < 300:
|
|
87
|
-
return
|
|
88
|
-
_response_json = _response.json()
|
|
89
|
-
except JSONDecodeError:
|
|
90
|
-
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
91
|
-
raise ApiError(status_code=_response.status_code, body=_response_json)
|
|
92
|
-
|
|
93
|
-
def update(
|
|
94
|
-
self,
|
|
95
|
-
id: int,
|
|
96
|
-
*,
|
|
97
|
-
frames: typing.Optional[typing.Dict[str, typing.Any]] = OMIT,
|
|
98
|
-
request_options: typing.Optional[RequestOptions] = None,
|
|
99
|
-
) -> FrameFilter:
|
|
100
|
-
""" """
|
|
101
|
-
_response = self._client_wrapper.httpx_client.request(
|
|
102
|
-
f"api/frame-filter/{jsonable_encoder(id)}/",
|
|
103
|
-
method="PATCH",
|
|
104
|
-
json={
|
|
105
|
-
"frames": frames,
|
|
106
|
-
},
|
|
107
|
-
request_options=request_options,
|
|
108
|
-
omit=OMIT,
|
|
109
|
-
)
|
|
110
|
-
try:
|
|
111
|
-
if 200 <= _response.status_code < 300:
|
|
112
|
-
return pydantic_v1.parse_obj_as(FrameFilter, _response.json()) # type: ignore
|
|
113
|
-
_response_json = _response.json()
|
|
114
|
-
except JSONDecodeError:
|
|
115
|
-
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
116
|
-
raise ApiError(status_code=_response.status_code, body=_response_json)
|
|
117
|
-
|
|
118
|
-
def list(
|
|
119
|
-
self,
|
|
120
|
-
# log_id: int, *,
|
|
121
|
-
request_options: typing.Optional[RequestOptions] = None,
|
|
122
|
-
**filters: typing.Any,
|
|
123
|
-
) -> typing.List[FrameFilter]:
|
|
124
|
-
""" """
|
|
125
|
-
query_params = {k: v for k, v in filters.items() if v is not None}
|
|
126
|
-
|
|
127
|
-
url = "api/frame-filter/"
|
|
128
|
-
_response = self._client_wrapper.httpx_client.request(
|
|
129
|
-
url, method="GET", request_options=request_options, params=query_params
|
|
130
|
-
)
|
|
131
|
-
try:
|
|
132
|
-
if 200 <= _response.status_code < 300:
|
|
133
|
-
return pydantic_v1.parse_obj_as(
|
|
134
|
-
typing.List[FrameFilter], _response.json()
|
|
135
|
-
) # type: ignore
|
|
136
|
-
_response_json = _response.json()
|
|
137
|
-
except JSONDecodeError:
|
|
138
|
-
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
139
|
-
raise ApiError(status_code=_response.status_code, body=_response_json)
|
|
140
|
-
|
|
141
|
-
def create(
|
|
142
|
-
self,
|
|
143
|
-
*,
|
|
144
|
-
log_id: typing.Optional[int] = OMIT,
|
|
145
|
-
frames: typing.Optional[typing.Dict[str, typing.Any]] = OMIT,
|
|
146
|
-
name: typing.Optional[str] = OMIT,
|
|
147
|
-
request_options: typing.Optional[RequestOptions] = None,
|
|
148
|
-
) -> FrameFilter:
|
|
149
|
-
"""
|
|
150
|
-
|
|
151
|
-
Parameters
|
|
152
|
-
----------
|
|
153
|
-
|
|
154
|
-
Returns
|
|
155
|
-
-------
|
|
156
|
-
|
|
157
|
-
Examples
|
|
158
|
-
--------
|
|
159
|
-
```python
|
|
160
|
-
from vaapi.client import Vaapi
|
|
161
|
-
|
|
162
|
-
client = Vaapi(
|
|
163
|
-
base_url='https://vat.berlin-united.com/',
|
|
164
|
-
api_key="YOUR_API_KEY",
|
|
165
|
-
)
|
|
166
|
-
```
|
|
167
|
-
"""
|
|
168
|
-
_response = self._client_wrapper.httpx_client.request(
|
|
169
|
-
"api/frame-filter/",
|
|
170
|
-
method="POST",
|
|
171
|
-
json={"log": log_id, "frames": frames, "name": name},
|
|
172
|
-
request_options=request_options,
|
|
173
|
-
omit=OMIT,
|
|
174
|
-
)
|
|
175
|
-
try:
|
|
176
|
-
if 200 <= _response.status_code < 300:
|
|
177
|
-
return pydantic_v1.parse_obj_as(FrameFilter, _response.json()) # type: ignore
|
|
178
|
-
_response_json = _response.json()
|
|
179
|
-
except JSONDecodeError:
|
|
180
|
-
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
181
|
-
raise ApiError(status_code=_response.status_code, body=_response_json)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{vaapi-0.7.28/vaapi/behavior_frame_option → vaapi-0.7.30/vaapi/behavior_options}/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
{vaapi-0.7.28/vaapi/behavior_options → vaapi-0.7.30/vaapi/behavior_options_state}/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{vaapi-0.7.28/vaapi/behavior_options_state → vaapi-0.7.30/vaapi/cognition_frame}/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
{vaapi-0.7.28/vaapi/cognition_frame → vaapi-0.7.30/vaapi/cognition_representation}/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|