arize 8.0.0a12__py3-none-any.whl → 8.0.0a13__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.
- arize/_flight/client.py +79 -3
- arize/_generated/api_client/__init__.py +1 -43
- arize/_generated/api_client/api/__init__.py +1 -17
- arize/_generated/api_client/api/datasets_api.py +10 -11
- arize/_generated/api_client/api/experiments_api.py +276 -0
- arize/_generated/api_client/api_client.py +4 -4
- arize/_generated/api_client/models/__init__.py +1 -26
- arize/_generated/api_client/models/dataset.py +5 -13
- arize/_generated/api_client/models/dataset_version.py +5 -13
- arize/_generated/api_client/models/datasets_create_request.py +5 -13
- arize/_generated/api_client/models/datasets_list200_response.py +5 -0
- arize/_generated/api_client/models/datasets_list_examples200_response.py +8 -3
- arize/_generated/api_client/models/error.py +5 -13
- arize/_generated/api_client/models/experiment.py +5 -13
- arize/_generated/api_client/models/experiments_list200_response.py +14 -9
- arize/_generated/api_client/test/test_datasets_list_examples200_response.py +2 -2
- arize/_generated/api_client/test/test_experiments_api.py +7 -0
- arize/_generated/api_client/test/test_experiments_list200_response.py +2 -2
- arize/_generated/api_client_README.md +2 -2
- arize/_generated/protocol/flight/export_pb2.py +8 -8
- arize/_lazy.py +4 -0
- arize/client.py +17 -4
- arize/config.py +13 -3
- arize/datasets/__init__.py +70 -0
- arize/datasets/client.py +119 -1
- arize/utils/proto.py +0 -36
- arize/version.py +1 -1
- {arize-8.0.0a12.dist-info → arize-8.0.0a13.dist-info}/METADATA +90 -1
- {arize-8.0.0a12.dist-info → arize-8.0.0a13.dist-info}/RECORD +31 -33
- arize/_generated/api_client/models/datasets_create201_response.py +0 -87
- arize/_generated/api_client/test/test_datasets_create201_response.py +0 -52
- {arize-8.0.0a12.dist-info → arize-8.0.0a13.dist-info}/WHEEL +0 -0
- {arize-8.0.0a12.dist-info → arize-8.0.0a13.dist-info}/licenses/LICENSE.md +0 -0
arize/_flight/client.py
CHANGED
|
@@ -10,6 +10,7 @@ from google.protobuf import json_format
|
|
|
10
10
|
from pyarrow import flight
|
|
11
11
|
|
|
12
12
|
from arize._flight.types import FlightRequestType
|
|
13
|
+
from arize._generated.protocol.flight import ingest_pb2 as flight_ing_pb2
|
|
13
14
|
from arize._generated.protocol.flight.ingest_pb2 import (
|
|
14
15
|
WriteSpanAnnotationResponse,
|
|
15
16
|
WriteSpanAttributesMetadataResponse,
|
|
@@ -17,7 +18,6 @@ from arize._generated.protocol.flight.ingest_pb2 import (
|
|
|
17
18
|
)
|
|
18
19
|
from arize.config import get_python_version
|
|
19
20
|
from arize.logging import log_a_list
|
|
20
|
-
from arize.utils.proto import get_pb_flight_doput_request, get_pb_schema_tracing
|
|
21
21
|
from arize.version import __version__
|
|
22
22
|
|
|
23
23
|
if TYPE_CHECKING:
|
|
@@ -137,7 +137,7 @@ class ArizeFlightClient:
|
|
|
137
137
|
pa_table.schema, {"arize-schema": base64_schema}
|
|
138
138
|
)
|
|
139
139
|
|
|
140
|
-
doput_request =
|
|
140
|
+
doput_request = _get_pb_flight_doput_request(
|
|
141
141
|
space_id=space_id,
|
|
142
142
|
model_id=project_name,
|
|
143
143
|
request_type=request_type,
|
|
@@ -179,7 +179,49 @@ class ArizeFlightClient:
|
|
|
179
179
|
return res
|
|
180
180
|
except Exception as e:
|
|
181
181
|
logger.exception(f"Error logging arrow table to Arize: {e}")
|
|
182
|
-
|
|
182
|
+
raise RuntimeError(f"Error logging arrow table to Arize: {e}") from e
|
|
183
|
+
|
|
184
|
+
# ---------- dataset methods ----------
|
|
185
|
+
|
|
186
|
+
def create_dataset(
|
|
187
|
+
self,
|
|
188
|
+
space_id: str,
|
|
189
|
+
dataset_name: str,
|
|
190
|
+
pa_table: pa.Table,
|
|
191
|
+
) -> str:
|
|
192
|
+
doput_request = flight_ing_pb2.DoPutRequest(
|
|
193
|
+
create_dataset=flight_ing_pb2.CreateDatasetRequest(
|
|
194
|
+
space_id=space_id,
|
|
195
|
+
dataset_name=dataset_name,
|
|
196
|
+
dataset_type=flight_ing_pb2.GENERATIVE,
|
|
197
|
+
)
|
|
198
|
+
)
|
|
199
|
+
descriptor = flight.FlightDescriptor.for_command(
|
|
200
|
+
json_format.MessageToJson(doput_request).encode("utf-8")
|
|
201
|
+
)
|
|
202
|
+
try:
|
|
203
|
+
flight_writer, flight_metadata_reader = self.do_put(
|
|
204
|
+
descriptor, pa_table.schema, options=self.call_options
|
|
205
|
+
)
|
|
206
|
+
with flight_writer:
|
|
207
|
+
# write table as stream to flight server
|
|
208
|
+
flight_writer.write_table(pa_table)
|
|
209
|
+
# indicate that client has flushed all contents to stream
|
|
210
|
+
flight_writer.done_writing()
|
|
211
|
+
# read response from flight server
|
|
212
|
+
flight_response = flight_metadata_reader.read()
|
|
213
|
+
if flight_response is None:
|
|
214
|
+
return None
|
|
215
|
+
|
|
216
|
+
res = None
|
|
217
|
+
res = flight_ing_pb2.CreateDatasetResponse()
|
|
218
|
+
res.ParseFromString(flight_response.to_pybytes())
|
|
219
|
+
if res:
|
|
220
|
+
return str(res.dataset_id)
|
|
221
|
+
return res
|
|
222
|
+
except Exception as e:
|
|
223
|
+
logger.exception(f"Error logging arrow table to Arize: {e}")
|
|
224
|
+
raise RuntimeError(f"Error logging arrow table to Arize: {e}") from e
|
|
183
225
|
|
|
184
226
|
|
|
185
227
|
def append_to_pyarrow_metadata(
|
|
@@ -201,3 +243,37 @@ def append_to_pyarrow_metadata(
|
|
|
201
243
|
updated_metadata = metadata.copy()
|
|
202
244
|
updated_metadata.update(new_metadata)
|
|
203
245
|
return pa_schema.with_metadata(updated_metadata)
|
|
246
|
+
|
|
247
|
+
|
|
248
|
+
def _get_pb_flight_doput_request(
|
|
249
|
+
space_id,
|
|
250
|
+
model_id: str,
|
|
251
|
+
request_type: FlightRequestType,
|
|
252
|
+
) -> flight_ing_pb2.DoPutRequest:
|
|
253
|
+
"""Return a DoPutRequest for the given request_type."""
|
|
254
|
+
common_args: dict[str, str] = {
|
|
255
|
+
"space_id": space_id,
|
|
256
|
+
"external_model_id": model_id,
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
match request_type:
|
|
260
|
+
case FlightRequestType.EVALUATION:
|
|
261
|
+
return flight_ing_pb2.DoPutRequest(
|
|
262
|
+
write_span_evaluation_request=flight_ing_pb2.WriteSpanEvaluationRequest(
|
|
263
|
+
**common_args
|
|
264
|
+
)
|
|
265
|
+
)
|
|
266
|
+
case FlightRequestType.ANNOTATION:
|
|
267
|
+
return flight_ing_pb2.DoPutRequest(
|
|
268
|
+
write_span_annotation_request=flight_ing_pb2.WriteSpanAnnotationRequest(
|
|
269
|
+
**common_args
|
|
270
|
+
)
|
|
271
|
+
)
|
|
272
|
+
case FlightRequestType.METADATA:
|
|
273
|
+
return flight_ing_pb2.DoPutRequest(
|
|
274
|
+
write_span_attributes_metadata_request=flight_ing_pb2.WriteSpanAttributesMetadataRequest(
|
|
275
|
+
**common_args
|
|
276
|
+
)
|
|
277
|
+
)
|
|
278
|
+
case _:
|
|
279
|
+
raise ValueError(f"Unsupported request_type: {request_type}")
|
|
@@ -31,7 +31,6 @@ __all__ = [
|
|
|
31
31
|
"ApiException",
|
|
32
32
|
"Dataset",
|
|
33
33
|
"DatasetVersion",
|
|
34
|
-
"DatasetsCreate201Response",
|
|
35
34
|
"DatasetsCreateRequest",
|
|
36
35
|
"DatasetsList200Response",
|
|
37
36
|
"DatasetsListExamples200Response",
|
|
@@ -40,42 +39,7 @@ __all__ = [
|
|
|
40
39
|
"ExperimentsList200Response",
|
|
41
40
|
]
|
|
42
41
|
|
|
43
|
-
|
|
44
|
-
# import apis into sdk package
|
|
45
|
-
from arize._generated.api_client.api.datasets_api import DatasetsApi as DatasetsApi
|
|
46
|
-
from arize._generated.api_client.api.experiments_api import ExperimentsApi as ExperimentsApi
|
|
47
|
-
|
|
48
|
-
# import ApiClient
|
|
49
|
-
from arize._generated.api_client.api_response import ApiResponse as ApiResponse
|
|
50
|
-
from arize._generated.api_client.api_client import ApiClient as ApiClient
|
|
51
|
-
from arize._generated.api_client.configuration import Configuration as Configuration
|
|
52
|
-
from arize._generated.api_client.exceptions import OpenApiException as OpenApiException
|
|
53
|
-
from arize._generated.api_client.exceptions import ApiTypeError as ApiTypeError
|
|
54
|
-
from arize._generated.api_client.exceptions import ApiValueError as ApiValueError
|
|
55
|
-
from arize._generated.api_client.exceptions import ApiKeyError as ApiKeyError
|
|
56
|
-
from arize._generated.api_client.exceptions import ApiAttributeError as ApiAttributeError
|
|
57
|
-
from arize._generated.api_client.exceptions import ApiException as ApiException
|
|
58
|
-
|
|
59
|
-
# import models into sdk package
|
|
60
|
-
from arize._generated.api_client.models.dataset import Dataset as Dataset
|
|
61
|
-
from arize._generated.api_client.models.dataset_version import DatasetVersion as DatasetVersion
|
|
62
|
-
from arize._generated.api_client.models.datasets_create201_response import DatasetsCreate201Response as DatasetsCreate201Response
|
|
63
|
-
from arize._generated.api_client.models.datasets_create_request import DatasetsCreateRequest as DatasetsCreateRequest
|
|
64
|
-
from arize._generated.api_client.models.datasets_list200_response import DatasetsList200Response as DatasetsList200Response
|
|
65
|
-
from arize._generated.api_client.models.datasets_list_examples200_response import DatasetsListExamples200Response as DatasetsListExamples200Response
|
|
66
|
-
from arize._generated.api_client.models.error import Error as Error
|
|
67
|
-
from arize._generated.api_client.models.experiment import Experiment as Experiment
|
|
68
|
-
from arize._generated.api_client.models.experiments_list200_response import ExperimentsList200Response as ExperimentsList200Response
|
|
69
|
-
|
|
70
|
-
else:
|
|
71
|
-
from lazy_imports import LazyModule, as_package, load
|
|
72
|
-
|
|
73
|
-
load(
|
|
74
|
-
LazyModule(
|
|
75
|
-
*as_package(__file__),
|
|
76
|
-
("__version__", __version__),
|
|
77
|
-
("__all__", __all__),
|
|
78
|
-
"""# import apis into sdk package
|
|
42
|
+
# import apis into sdk package
|
|
79
43
|
from arize._generated.api_client.api.datasets_api import DatasetsApi as DatasetsApi
|
|
80
44
|
from arize._generated.api_client.api.experiments_api import ExperimentsApi as ExperimentsApi
|
|
81
45
|
|
|
@@ -93,7 +57,6 @@ from arize._generated.api_client.exceptions import ApiException as ApiException
|
|
|
93
57
|
# import models into sdk package
|
|
94
58
|
from arize._generated.api_client.models.dataset import Dataset as Dataset
|
|
95
59
|
from arize._generated.api_client.models.dataset_version import DatasetVersion as DatasetVersion
|
|
96
|
-
from arize._generated.api_client.models.datasets_create201_response import DatasetsCreate201Response as DatasetsCreate201Response
|
|
97
60
|
from arize._generated.api_client.models.datasets_create_request import DatasetsCreateRequest as DatasetsCreateRequest
|
|
98
61
|
from arize._generated.api_client.models.datasets_list200_response import DatasetsList200Response as DatasetsList200Response
|
|
99
62
|
from arize._generated.api_client.models.datasets_list_examples200_response import DatasetsListExamples200Response as DatasetsListExamples200Response
|
|
@@ -101,8 +64,3 @@ from arize._generated.api_client.models.error import Error as Error
|
|
|
101
64
|
from arize._generated.api_client.models.experiment import Experiment as Experiment
|
|
102
65
|
from arize._generated.api_client.models.experiments_list200_response import ExperimentsList200Response as ExperimentsList200Response
|
|
103
66
|
|
|
104
|
-
""",
|
|
105
|
-
name=__name__,
|
|
106
|
-
doc=__doc__,
|
|
107
|
-
)
|
|
108
|
-
)
|
|
@@ -1,22 +1,6 @@
|
|
|
1
1
|
# flake8: noqa
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
# import apis into api package
|
|
5
|
-
from arize._generated.api_client.api.datasets_api import DatasetsApi
|
|
6
|
-
from arize._generated.api_client.api.experiments_api import ExperimentsApi
|
|
7
|
-
|
|
8
|
-
else:
|
|
9
|
-
from lazy_imports import LazyModule, as_package, load
|
|
10
|
-
|
|
11
|
-
load(
|
|
12
|
-
LazyModule(
|
|
13
|
-
*as_package(__file__),
|
|
14
|
-
"""# import apis into api package
|
|
3
|
+
# import apis into api package
|
|
15
4
|
from arize._generated.api_client.api.datasets_api import DatasetsApi
|
|
16
5
|
from arize._generated.api_client.api.experiments_api import ExperimentsApi
|
|
17
6
|
|
|
18
|
-
""",
|
|
19
|
-
name=__name__,
|
|
20
|
-
doc=__doc__,
|
|
21
|
-
)
|
|
22
|
-
)
|
|
@@ -20,7 +20,6 @@ from pydantic import Field, StrictInt, StrictStr
|
|
|
20
20
|
from typing import Optional
|
|
21
21
|
from typing_extensions import Annotated
|
|
22
22
|
from arize._generated.api_client.models.dataset import Dataset
|
|
23
|
-
from arize._generated.api_client.models.datasets_create201_response import DatasetsCreate201Response
|
|
24
23
|
from arize._generated.api_client.models.datasets_create_request import DatasetsCreateRequest
|
|
25
24
|
from arize._generated.api_client.models.datasets_list200_response import DatasetsList200Response
|
|
26
25
|
from arize._generated.api_client.models.datasets_list_examples200_response import DatasetsListExamples200Response
|
|
@@ -59,7 +58,7 @@ class DatasetsApi:
|
|
|
59
58
|
_content_type: Optional[StrictStr] = None,
|
|
60
59
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
61
60
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
62
|
-
) ->
|
|
61
|
+
) -> Dataset:
|
|
63
62
|
"""Create a new dataset with JSON examples
|
|
64
63
|
|
|
65
64
|
|
|
@@ -96,7 +95,7 @@ class DatasetsApi:
|
|
|
96
95
|
)
|
|
97
96
|
|
|
98
97
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
99
|
-
'201': "
|
|
98
|
+
'201': "Dataset",
|
|
100
99
|
'400': "Error",
|
|
101
100
|
'401': "Error",
|
|
102
101
|
'403': "Error",
|
|
@@ -129,7 +128,7 @@ class DatasetsApi:
|
|
|
129
128
|
_content_type: Optional[StrictStr] = None,
|
|
130
129
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
131
130
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
132
|
-
) -> ApiResponse[
|
|
131
|
+
) -> ApiResponse[Dataset]:
|
|
133
132
|
"""Create a new dataset with JSON examples
|
|
134
133
|
|
|
135
134
|
|
|
@@ -166,7 +165,7 @@ class DatasetsApi:
|
|
|
166
165
|
)
|
|
167
166
|
|
|
168
167
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
169
|
-
'201': "
|
|
168
|
+
'201': "Dataset",
|
|
170
169
|
'400': "Error",
|
|
171
170
|
'401': "Error",
|
|
172
171
|
'403': "Error",
|
|
@@ -236,7 +235,7 @@ class DatasetsApi:
|
|
|
236
235
|
)
|
|
237
236
|
|
|
238
237
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
239
|
-
'201': "
|
|
238
|
+
'201': "Dataset",
|
|
240
239
|
'400': "Error",
|
|
241
240
|
'401': "Error",
|
|
242
241
|
'403': "Error",
|
|
@@ -342,7 +341,7 @@ class DatasetsApi:
|
|
|
342
341
|
_content_type: Optional[StrictStr] = None,
|
|
343
342
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
344
343
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
345
|
-
) ->
|
|
344
|
+
) -> None:
|
|
346
345
|
"""Delete a dataset by ID
|
|
347
346
|
|
|
348
347
|
|
|
@@ -379,7 +378,7 @@ class DatasetsApi:
|
|
|
379
378
|
)
|
|
380
379
|
|
|
381
380
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
382
|
-
'
|
|
381
|
+
'204': None,
|
|
383
382
|
'400': "Error",
|
|
384
383
|
'401': "Error",
|
|
385
384
|
'403': "Error",
|
|
@@ -414,7 +413,7 @@ class DatasetsApi:
|
|
|
414
413
|
_content_type: Optional[StrictStr] = None,
|
|
415
414
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
416
415
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
417
|
-
) -> ApiResponse[
|
|
416
|
+
) -> ApiResponse[None]:
|
|
418
417
|
"""Delete a dataset by ID
|
|
419
418
|
|
|
420
419
|
|
|
@@ -451,7 +450,7 @@ class DatasetsApi:
|
|
|
451
450
|
)
|
|
452
451
|
|
|
453
452
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
454
|
-
'
|
|
453
|
+
'204': None,
|
|
455
454
|
'400': "Error",
|
|
456
455
|
'401': "Error",
|
|
457
456
|
'403': "Error",
|
|
@@ -523,7 +522,7 @@ class DatasetsApi:
|
|
|
523
522
|
)
|
|
524
523
|
|
|
525
524
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
526
|
-
'
|
|
525
|
+
'204': None,
|
|
527
526
|
'400': "Error",
|
|
528
527
|
'401': "Error",
|
|
529
528
|
'403': "Error",
|
|
@@ -39,6 +39,282 @@ class ExperimentsApi:
|
|
|
39
39
|
self.api_client = api_client
|
|
40
40
|
|
|
41
41
|
|
|
42
|
+
@validate_call
|
|
43
|
+
def experiments_delete(
|
|
44
|
+
self,
|
|
45
|
+
experiment_id: Annotated[StrictStr, Field(description="The unique identifier of the experiment")],
|
|
46
|
+
_request_timeout: Union[
|
|
47
|
+
None,
|
|
48
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
49
|
+
Tuple[
|
|
50
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
51
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
52
|
+
]
|
|
53
|
+
] = None,
|
|
54
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
55
|
+
_content_type: Optional[StrictStr] = None,
|
|
56
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
57
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
58
|
+
) -> None:
|
|
59
|
+
"""Delete an experiment by ID
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
:param experiment_id: The unique identifier of the experiment (required)
|
|
63
|
+
:type experiment_id: str
|
|
64
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
65
|
+
number provided, it will be total request
|
|
66
|
+
timeout. It can also be a pair (tuple) of
|
|
67
|
+
(connection, read) timeouts.
|
|
68
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
69
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
70
|
+
request; this effectively ignores the
|
|
71
|
+
authentication in the spec for a single request.
|
|
72
|
+
:type _request_auth: dict, optional
|
|
73
|
+
:param _content_type: force content-type for the request.
|
|
74
|
+
:type _content_type: str, Optional
|
|
75
|
+
:param _headers: set to override the headers for a single
|
|
76
|
+
request; this effectively ignores the headers
|
|
77
|
+
in the spec for a single request.
|
|
78
|
+
:type _headers: dict, optional
|
|
79
|
+
:param _host_index: set to override the host_index for a single
|
|
80
|
+
request; this effectively ignores the host_index
|
|
81
|
+
in the spec for a single request.
|
|
82
|
+
:type _host_index: int, optional
|
|
83
|
+
:return: Returns the result object.
|
|
84
|
+
""" # noqa: E501
|
|
85
|
+
|
|
86
|
+
_param = self._experiments_delete_serialize(
|
|
87
|
+
experiment_id=experiment_id,
|
|
88
|
+
_request_auth=_request_auth,
|
|
89
|
+
_content_type=_content_type,
|
|
90
|
+
_headers=_headers,
|
|
91
|
+
_host_index=_host_index
|
|
92
|
+
)
|
|
93
|
+
|
|
94
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
95
|
+
'204': None,
|
|
96
|
+
'400': "Error",
|
|
97
|
+
'401': "Error",
|
|
98
|
+
'403': "Error",
|
|
99
|
+
'404': "Error",
|
|
100
|
+
'422': "Error",
|
|
101
|
+
'429': "Error",
|
|
102
|
+
}
|
|
103
|
+
response_data = self.api_client.call_api(
|
|
104
|
+
*_param,
|
|
105
|
+
_request_timeout=_request_timeout
|
|
106
|
+
)
|
|
107
|
+
response_data.read()
|
|
108
|
+
return self.api_client.response_deserialize(
|
|
109
|
+
response_data=response_data,
|
|
110
|
+
response_types_map=_response_types_map,
|
|
111
|
+
).data
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
@validate_call
|
|
115
|
+
def experiments_delete_with_http_info(
|
|
116
|
+
self,
|
|
117
|
+
experiment_id: Annotated[StrictStr, Field(description="The unique identifier of the experiment")],
|
|
118
|
+
_request_timeout: Union[
|
|
119
|
+
None,
|
|
120
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
121
|
+
Tuple[
|
|
122
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
123
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
124
|
+
]
|
|
125
|
+
] = None,
|
|
126
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
127
|
+
_content_type: Optional[StrictStr] = None,
|
|
128
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
129
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
130
|
+
) -> ApiResponse[None]:
|
|
131
|
+
"""Delete an experiment by ID
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
:param experiment_id: The unique identifier of the experiment (required)
|
|
135
|
+
:type experiment_id: str
|
|
136
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
137
|
+
number provided, it will be total request
|
|
138
|
+
timeout. It can also be a pair (tuple) of
|
|
139
|
+
(connection, read) timeouts.
|
|
140
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
141
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
142
|
+
request; this effectively ignores the
|
|
143
|
+
authentication in the spec for a single request.
|
|
144
|
+
:type _request_auth: dict, optional
|
|
145
|
+
:param _content_type: force content-type for the request.
|
|
146
|
+
:type _content_type: str, Optional
|
|
147
|
+
:param _headers: set to override the headers for a single
|
|
148
|
+
request; this effectively ignores the headers
|
|
149
|
+
in the spec for a single request.
|
|
150
|
+
:type _headers: dict, optional
|
|
151
|
+
:param _host_index: set to override the host_index for a single
|
|
152
|
+
request; this effectively ignores the host_index
|
|
153
|
+
in the spec for a single request.
|
|
154
|
+
:type _host_index: int, optional
|
|
155
|
+
:return: Returns the result object.
|
|
156
|
+
""" # noqa: E501
|
|
157
|
+
|
|
158
|
+
_param = self._experiments_delete_serialize(
|
|
159
|
+
experiment_id=experiment_id,
|
|
160
|
+
_request_auth=_request_auth,
|
|
161
|
+
_content_type=_content_type,
|
|
162
|
+
_headers=_headers,
|
|
163
|
+
_host_index=_host_index
|
|
164
|
+
)
|
|
165
|
+
|
|
166
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
167
|
+
'204': None,
|
|
168
|
+
'400': "Error",
|
|
169
|
+
'401': "Error",
|
|
170
|
+
'403': "Error",
|
|
171
|
+
'404': "Error",
|
|
172
|
+
'422': "Error",
|
|
173
|
+
'429': "Error",
|
|
174
|
+
}
|
|
175
|
+
response_data = self.api_client.call_api(
|
|
176
|
+
*_param,
|
|
177
|
+
_request_timeout=_request_timeout
|
|
178
|
+
)
|
|
179
|
+
response_data.read()
|
|
180
|
+
return self.api_client.response_deserialize(
|
|
181
|
+
response_data=response_data,
|
|
182
|
+
response_types_map=_response_types_map,
|
|
183
|
+
)
|
|
184
|
+
|
|
185
|
+
|
|
186
|
+
@validate_call
|
|
187
|
+
def experiments_delete_without_preload_content(
|
|
188
|
+
self,
|
|
189
|
+
experiment_id: Annotated[StrictStr, Field(description="The unique identifier of the experiment")],
|
|
190
|
+
_request_timeout: Union[
|
|
191
|
+
None,
|
|
192
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
193
|
+
Tuple[
|
|
194
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
195
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
196
|
+
]
|
|
197
|
+
] = None,
|
|
198
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
199
|
+
_content_type: Optional[StrictStr] = None,
|
|
200
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
201
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
202
|
+
) -> RESTResponseType:
|
|
203
|
+
"""Delete an experiment by ID
|
|
204
|
+
|
|
205
|
+
|
|
206
|
+
:param experiment_id: The unique identifier of the experiment (required)
|
|
207
|
+
:type experiment_id: str
|
|
208
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
209
|
+
number provided, it will be total request
|
|
210
|
+
timeout. It can also be a pair (tuple) of
|
|
211
|
+
(connection, read) timeouts.
|
|
212
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
213
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
214
|
+
request; this effectively ignores the
|
|
215
|
+
authentication in the spec for a single request.
|
|
216
|
+
:type _request_auth: dict, optional
|
|
217
|
+
:param _content_type: force content-type for the request.
|
|
218
|
+
:type _content_type: str, Optional
|
|
219
|
+
:param _headers: set to override the headers for a single
|
|
220
|
+
request; this effectively ignores the headers
|
|
221
|
+
in the spec for a single request.
|
|
222
|
+
:type _headers: dict, optional
|
|
223
|
+
:param _host_index: set to override the host_index for a single
|
|
224
|
+
request; this effectively ignores the host_index
|
|
225
|
+
in the spec for a single request.
|
|
226
|
+
:type _host_index: int, optional
|
|
227
|
+
:return: Returns the result object.
|
|
228
|
+
""" # noqa: E501
|
|
229
|
+
|
|
230
|
+
_param = self._experiments_delete_serialize(
|
|
231
|
+
experiment_id=experiment_id,
|
|
232
|
+
_request_auth=_request_auth,
|
|
233
|
+
_content_type=_content_type,
|
|
234
|
+
_headers=_headers,
|
|
235
|
+
_host_index=_host_index
|
|
236
|
+
)
|
|
237
|
+
|
|
238
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
239
|
+
'204': None,
|
|
240
|
+
'400': "Error",
|
|
241
|
+
'401': "Error",
|
|
242
|
+
'403': "Error",
|
|
243
|
+
'404': "Error",
|
|
244
|
+
'422': "Error",
|
|
245
|
+
'429': "Error",
|
|
246
|
+
}
|
|
247
|
+
response_data = self.api_client.call_api(
|
|
248
|
+
*_param,
|
|
249
|
+
_request_timeout=_request_timeout
|
|
250
|
+
)
|
|
251
|
+
return response_data.response
|
|
252
|
+
|
|
253
|
+
|
|
254
|
+
def _experiments_delete_serialize(
|
|
255
|
+
self,
|
|
256
|
+
experiment_id,
|
|
257
|
+
_request_auth,
|
|
258
|
+
_content_type,
|
|
259
|
+
_headers,
|
|
260
|
+
_host_index,
|
|
261
|
+
) -> RequestSerialized:
|
|
262
|
+
|
|
263
|
+
_host = None
|
|
264
|
+
|
|
265
|
+
_collection_formats: Dict[str, str] = {
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
_path_params: Dict[str, str] = {}
|
|
269
|
+
_query_params: List[Tuple[str, str]] = []
|
|
270
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
271
|
+
_form_params: List[Tuple[str, str]] = []
|
|
272
|
+
_files: Dict[
|
|
273
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
274
|
+
] = {}
|
|
275
|
+
_body_params: Optional[bytes] = None
|
|
276
|
+
|
|
277
|
+
# process the path parameters
|
|
278
|
+
if experiment_id is not None:
|
|
279
|
+
_path_params['experimentId'] = experiment_id
|
|
280
|
+
# process the query parameters
|
|
281
|
+
# process the header parameters
|
|
282
|
+
# process the form parameters
|
|
283
|
+
# process the body parameter
|
|
284
|
+
|
|
285
|
+
|
|
286
|
+
# set the HTTP header `Accept`
|
|
287
|
+
if 'Accept' not in _header_params:
|
|
288
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
289
|
+
[
|
|
290
|
+
'application/json'
|
|
291
|
+
]
|
|
292
|
+
)
|
|
293
|
+
|
|
294
|
+
|
|
295
|
+
# authentication setting
|
|
296
|
+
_auth_settings: List[str] = [
|
|
297
|
+
'ApiKeyAuth'
|
|
298
|
+
]
|
|
299
|
+
|
|
300
|
+
return self.api_client.param_serialize(
|
|
301
|
+
method='DELETE',
|
|
302
|
+
resource_path='/api/v1/experiments/{experimentId}',
|
|
303
|
+
path_params=_path_params,
|
|
304
|
+
query_params=_query_params,
|
|
305
|
+
header_params=_header_params,
|
|
306
|
+
body=_body_params,
|
|
307
|
+
post_params=_form_params,
|
|
308
|
+
files=_files,
|
|
309
|
+
auth_settings=_auth_settings,
|
|
310
|
+
collection_formats=_collection_formats,
|
|
311
|
+
_host=_host,
|
|
312
|
+
_request_auth=_request_auth
|
|
313
|
+
)
|
|
314
|
+
|
|
315
|
+
|
|
316
|
+
|
|
317
|
+
|
|
42
318
|
@validate_call
|
|
43
319
|
def experiments_list(
|
|
44
320
|
self,
|
|
@@ -460,13 +460,13 @@ class ApiClient:
|
|
|
460
460
|
|
|
461
461
|
if klass in self.PRIMITIVE_TYPES:
|
|
462
462
|
return self.__deserialize_primitive(data, klass)
|
|
463
|
-
elif klass
|
|
463
|
+
elif klass is object:
|
|
464
464
|
return self.__deserialize_object(data)
|
|
465
|
-
elif klass
|
|
465
|
+
elif klass is datetime.date:
|
|
466
466
|
return self.__deserialize_date(data)
|
|
467
|
-
elif klass
|
|
467
|
+
elif klass is datetime.datetime:
|
|
468
468
|
return self.__deserialize_datetime(data)
|
|
469
|
-
elif klass
|
|
469
|
+
elif klass is decimal.Decimal:
|
|
470
470
|
return decimal.Decimal(data)
|
|
471
471
|
elif issubclass(klass, Enum):
|
|
472
472
|
return self.__deserialize_enum(data, klass)
|
|
@@ -12,29 +12,9 @@
|
|
|
12
12
|
Do not edit the class manually.
|
|
13
13
|
""" # noqa: E501
|
|
14
14
|
|
|
15
|
-
|
|
16
|
-
if __import__("typing").TYPE_CHECKING:
|
|
17
|
-
# import models into model package
|
|
18
|
-
from arize._generated.api_client.models.dataset import Dataset
|
|
19
|
-
from arize._generated.api_client.models.dataset_version import DatasetVersion
|
|
20
|
-
from arize._generated.api_client.models.datasets_create201_response import DatasetsCreate201Response
|
|
21
|
-
from arize._generated.api_client.models.datasets_create_request import DatasetsCreateRequest
|
|
22
|
-
from arize._generated.api_client.models.datasets_list200_response import DatasetsList200Response
|
|
23
|
-
from arize._generated.api_client.models.datasets_list_examples200_response import DatasetsListExamples200Response
|
|
24
|
-
from arize._generated.api_client.models.error import Error
|
|
25
|
-
from arize._generated.api_client.models.experiment import Experiment
|
|
26
|
-
from arize._generated.api_client.models.experiments_list200_response import ExperimentsList200Response
|
|
27
|
-
|
|
28
|
-
else:
|
|
29
|
-
from lazy_imports import LazyModule, as_package, load
|
|
30
|
-
|
|
31
|
-
load(
|
|
32
|
-
LazyModule(
|
|
33
|
-
*as_package(__file__),
|
|
34
|
-
"""# import models into model package
|
|
15
|
+
# import models into model package
|
|
35
16
|
from arize._generated.api_client.models.dataset import Dataset
|
|
36
17
|
from arize._generated.api_client.models.dataset_version import DatasetVersion
|
|
37
|
-
from arize._generated.api_client.models.datasets_create201_response import DatasetsCreate201Response
|
|
38
18
|
from arize._generated.api_client.models.datasets_create_request import DatasetsCreateRequest
|
|
39
19
|
from arize._generated.api_client.models.datasets_list200_response import DatasetsList200Response
|
|
40
20
|
from arize._generated.api_client.models.datasets_list_examples200_response import DatasetsListExamples200Response
|
|
@@ -42,8 +22,3 @@ from arize._generated.api_client.models.error import Error
|
|
|
42
22
|
from arize._generated.api_client.models.experiment import Experiment
|
|
43
23
|
from arize._generated.api_client.models.experiments_list200_response import ExperimentsList200Response
|
|
44
24
|
|
|
45
|
-
""",
|
|
46
|
-
name=__name__,
|
|
47
|
-
doc=__doc__,
|
|
48
|
-
)
|
|
49
|
-
)
|