arize 8.0.0a22__py3-none-any.whl → 8.0.0a23__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/__init__.py +17 -9
- arize/_exporter/client.py +55 -36
- arize/_exporter/parsers/tracing_data_parser.py +41 -30
- arize/_exporter/validation.py +3 -3
- arize/_flight/client.py +207 -76
- arize/_generated/api_client/__init__.py +30 -6
- arize/_generated/api_client/api/__init__.py +1 -0
- arize/_generated/api_client/api/datasets_api.py +864 -190
- arize/_generated/api_client/api/experiments_api.py +167 -131
- arize/_generated/api_client/api/projects_api.py +1197 -0
- arize/_generated/api_client/api_client.py +2 -2
- arize/_generated/api_client/configuration.py +42 -34
- arize/_generated/api_client/exceptions.py +2 -2
- arize/_generated/api_client/models/__init__.py +15 -4
- arize/_generated/api_client/models/dataset.py +10 -10
- arize/_generated/api_client/models/dataset_example.py +111 -0
- arize/_generated/api_client/models/dataset_example_update.py +100 -0
- arize/_generated/api_client/models/dataset_version.py +13 -13
- arize/_generated/api_client/models/datasets_create_request.py +16 -8
- arize/_generated/api_client/models/datasets_examples_insert_request.py +100 -0
- arize/_generated/api_client/models/datasets_examples_list200_response.py +106 -0
- arize/_generated/api_client/models/datasets_examples_update_request.py +102 -0
- arize/_generated/api_client/models/datasets_list200_response.py +10 -4
- arize/_generated/api_client/models/experiment.py +14 -16
- arize/_generated/api_client/models/experiment_run.py +108 -0
- arize/_generated/api_client/models/experiment_run_create.py +102 -0
- arize/_generated/api_client/models/experiments_create_request.py +16 -10
- arize/_generated/api_client/models/experiments_list200_response.py +10 -4
- arize/_generated/api_client/models/experiments_runs_list200_response.py +19 -5
- arize/_generated/api_client/models/{error.py → pagination_metadata.py} +13 -11
- arize/_generated/api_client/models/primitive_value.py +172 -0
- arize/_generated/api_client/models/problem.py +100 -0
- arize/_generated/api_client/models/project.py +99 -0
- arize/_generated/api_client/models/{datasets_list_examples200_response.py → projects_create_request.py} +13 -11
- arize/_generated/api_client/models/projects_list200_response.py +106 -0
- arize/_generated/api_client/rest.py +2 -2
- arize/_generated/api_client/test/test_dataset.py +4 -2
- arize/_generated/api_client/test/test_dataset_example.py +56 -0
- arize/_generated/api_client/test/test_dataset_example_update.py +52 -0
- arize/_generated/api_client/test/test_dataset_version.py +7 -2
- arize/_generated/api_client/test/test_datasets_api.py +27 -13
- arize/_generated/api_client/test/test_datasets_create_request.py +8 -4
- arize/_generated/api_client/test/{test_datasets_list_examples200_response.py → test_datasets_examples_insert_request.py} +19 -15
- arize/_generated/api_client/test/test_datasets_examples_list200_response.py +66 -0
- arize/_generated/api_client/test/test_datasets_examples_update_request.py +61 -0
- arize/_generated/api_client/test/test_datasets_list200_response.py +9 -3
- arize/_generated/api_client/test/test_experiment.py +2 -4
- arize/_generated/api_client/test/test_experiment_run.py +56 -0
- arize/_generated/api_client/test/test_experiment_run_create.py +54 -0
- arize/_generated/api_client/test/test_experiments_api.py +6 -6
- arize/_generated/api_client/test/test_experiments_create_request.py +9 -6
- arize/_generated/api_client/test/test_experiments_list200_response.py +9 -5
- arize/_generated/api_client/test/test_experiments_runs_list200_response.py +15 -5
- arize/_generated/api_client/test/test_pagination_metadata.py +53 -0
- arize/_generated/api_client/test/{test_error.py → test_primitive_value.py} +13 -14
- arize/_generated/api_client/test/test_problem.py +57 -0
- arize/_generated/api_client/test/test_project.py +58 -0
- arize/_generated/api_client/test/test_projects_api.py +59 -0
- arize/_generated/api_client/test/test_projects_create_request.py +54 -0
- arize/_generated/api_client/test/test_projects_list200_response.py +70 -0
- arize/_generated/api_client_README.md +43 -29
- arize/_generated/protocol/flight/flight_pb2.py +400 -0
- arize/_lazy.py +27 -19
- arize/client.py +268 -55
- arize/config.py +365 -116
- arize/constants/__init__.py +1 -0
- arize/constants/config.py +11 -4
- arize/constants/ml.py +6 -4
- arize/constants/openinference.py +2 -0
- arize/constants/pyarrow.py +2 -0
- arize/constants/spans.py +3 -1
- arize/datasets/__init__.py +1 -0
- arize/datasets/client.py +299 -84
- arize/datasets/errors.py +32 -2
- arize/datasets/validation.py +18 -8
- arize/embeddings/__init__.py +2 -0
- arize/embeddings/auto_generator.py +23 -19
- arize/embeddings/base_generators.py +89 -36
- arize/embeddings/constants.py +2 -0
- arize/embeddings/cv_generators.py +26 -4
- arize/embeddings/errors.py +27 -5
- arize/embeddings/nlp_generators.py +31 -12
- arize/embeddings/tabular_generators.py +32 -20
- arize/embeddings/usecases.py +12 -2
- arize/exceptions/__init__.py +1 -0
- arize/exceptions/auth.py +11 -1
- arize/exceptions/base.py +29 -4
- arize/exceptions/models.py +21 -2
- arize/exceptions/parameters.py +31 -0
- arize/exceptions/spaces.py +12 -1
- arize/exceptions/types.py +86 -7
- arize/exceptions/values.py +220 -20
- arize/experiments/__init__.py +1 -0
- arize/experiments/client.py +389 -285
- arize/experiments/evaluators/__init__.py +1 -0
- arize/experiments/evaluators/base.py +74 -41
- arize/experiments/evaluators/exceptions.py +6 -3
- arize/experiments/evaluators/executors.py +121 -73
- arize/experiments/evaluators/rate_limiters.py +106 -57
- arize/experiments/evaluators/types.py +34 -7
- arize/experiments/evaluators/utils.py +65 -27
- arize/experiments/functions.py +103 -101
- arize/experiments/tracing.py +52 -44
- arize/experiments/types.py +56 -31
- arize/logging.py +54 -22
- arize/models/__init__.py +1 -0
- arize/models/batch_validation/__init__.py +1 -0
- arize/models/batch_validation/errors.py +543 -65
- arize/models/batch_validation/validator.py +339 -300
- arize/models/bounded_executor.py +20 -7
- arize/models/casting.py +75 -29
- arize/models/client.py +326 -107
- arize/models/proto.py +95 -40
- arize/models/stream_validation.py +42 -14
- arize/models/surrogate_explainer/__init__.py +1 -0
- arize/models/surrogate_explainer/mimic.py +24 -13
- arize/pre_releases.py +43 -0
- arize/projects/__init__.py +1 -0
- arize/projects/client.py +129 -0
- arize/regions.py +40 -0
- arize/spans/__init__.py +1 -0
- arize/spans/client.py +130 -106
- arize/spans/columns.py +13 -0
- arize/spans/conversion.py +54 -38
- arize/spans/validation/__init__.py +1 -0
- arize/spans/validation/annotations/__init__.py +1 -0
- arize/spans/validation/annotations/annotations_validation.py +6 -4
- arize/spans/validation/annotations/dataframe_form_validation.py +13 -11
- arize/spans/validation/annotations/value_validation.py +35 -11
- arize/spans/validation/common/__init__.py +1 -0
- arize/spans/validation/common/argument_validation.py +33 -8
- arize/spans/validation/common/dataframe_form_validation.py +35 -9
- arize/spans/validation/common/errors.py +211 -11
- arize/spans/validation/common/value_validation.py +80 -13
- arize/spans/validation/evals/__init__.py +1 -0
- arize/spans/validation/evals/dataframe_form_validation.py +28 -8
- arize/spans/validation/evals/evals_validation.py +34 -4
- arize/spans/validation/evals/value_validation.py +26 -3
- arize/spans/validation/metadata/__init__.py +1 -1
- arize/spans/validation/metadata/argument_validation.py +14 -5
- arize/spans/validation/metadata/dataframe_form_validation.py +26 -10
- arize/spans/validation/metadata/value_validation.py +24 -10
- arize/spans/validation/spans/__init__.py +1 -0
- arize/spans/validation/spans/dataframe_form_validation.py +34 -13
- arize/spans/validation/spans/spans_validation.py +35 -4
- arize/spans/validation/spans/value_validation.py +76 -7
- arize/types.py +293 -157
- arize/utils/__init__.py +1 -0
- arize/utils/arrow.py +31 -15
- arize/utils/cache.py +34 -6
- arize/utils/dataframe.py +19 -2
- arize/utils/online_tasks/__init__.py +2 -0
- arize/utils/online_tasks/dataframe_preprocessor.py +53 -41
- arize/utils/openinference_conversion.py +44 -5
- arize/utils/proto.py +10 -0
- arize/utils/size.py +5 -3
- arize/version.py +3 -1
- {arize-8.0.0a22.dist-info → arize-8.0.0a23.dist-info}/METADATA +4 -3
- arize-8.0.0a23.dist-info/RECORD +174 -0
- {arize-8.0.0a22.dist-info → arize-8.0.0a23.dist-info}/WHEEL +1 -1
- arize-8.0.0a23.dist-info/licenses/LICENSE +176 -0
- arize-8.0.0a23.dist-info/licenses/NOTICE +13 -0
- arize/_generated/protocol/flight/export_pb2.py +0 -61
- arize/_generated/protocol/flight/ingest_pb2.py +0 -365
- arize-8.0.0a22.dist-info/RECORD +0 -146
- arize-8.0.0a22.dist-info/licenses/LICENSE.md +0 -12
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
"""
|
|
4
4
|
Arize REST API
|
|
5
5
|
|
|
6
|
-
API specification for the backend data server. The API is hosted globally at https://api.arize.com/v2 or in your own environment.
|
|
6
|
+
API specification for the backend data server. The API is hosted globally at https://api.arize.com/v2 or in your own environment.
|
|
7
7
|
|
|
8
|
-
The version of the OpenAPI document: 0.0
|
|
8
|
+
The version of the OpenAPI document: 2.0.0
|
|
9
9
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
10
|
|
|
11
11
|
Do not edit the class manually.
|
|
@@ -16,13 +16,15 @@ from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
|
|
|
16
16
|
from typing import Any, Dict, List, Optional, Tuple, Union
|
|
17
17
|
from typing_extensions import Annotated
|
|
18
18
|
|
|
19
|
-
from pydantic import Field,
|
|
19
|
+
from pydantic import Field, 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
23
|
from arize._generated.api_client.models.datasets_create_request import DatasetsCreateRequest
|
|
24
|
+
from arize._generated.api_client.models.datasets_examples_insert_request import DatasetsExamplesInsertRequest
|
|
25
|
+
from arize._generated.api_client.models.datasets_examples_list200_response import DatasetsExamplesList200Response
|
|
26
|
+
from arize._generated.api_client.models.datasets_examples_update_request import DatasetsExamplesUpdateRequest
|
|
24
27
|
from arize._generated.api_client.models.datasets_list200_response import DatasetsList200Response
|
|
25
|
-
from arize._generated.api_client.models.datasets_list_examples200_response import DatasetsListExamples200Response
|
|
26
28
|
|
|
27
29
|
from arize._generated.api_client.api_client import ApiClient, RequestSerialized
|
|
28
30
|
from arize._generated.api_client.api_response import ApiResponse
|
|
@@ -59,8 +61,9 @@ class DatasetsApi:
|
|
|
59
61
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
60
62
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
61
63
|
) -> Dataset:
|
|
62
|
-
"""Create a
|
|
64
|
+
"""Create a dataset
|
|
63
65
|
|
|
66
|
+
Create a new dataset with JSON examples. Empty datasets are not allowed. **Payload Requirements** - The dataset name must be unique within the given space. - Each item in `examples[]` may contain **any user-defined fields**. - Do not include system-managed fields on input: `id`, `created_at`, `updated_at`. Requests that contain these fields in any example **will be rejected**. - Each example **must contain at least one property** (i.e., `{}` is invalid). **Valid example** (create) ```json { \"name\": \"my-dataset\", \"space_id\": \"spc_123\", \"examples\": [ { \"question\": \"What is 2+2?\", \"answer\": \"4\", \"topic\": \"math\" }, { \"question\": \"What is the capital of Spain?\", \"answer\": \"Madrid\", \"topic\": \"geography\" }, ] } ``` **Invalid example** ('id' not allowed on create) ```json { \"name\": \"my-dataset\", \"space_id\": \"spc_123\", \"examples\": [ { \"id\": \"ex_1\", \"input\": \"Hello\" } ] } ``` <Note>This endpoint is in beta, read more [here](https://arize.com/docs/ax/rest-reference#api-version-stages).</Note>
|
|
64
67
|
|
|
65
68
|
:param datasets_create_request: Body containing dataset creation parameters (required)
|
|
66
69
|
:type datasets_create_request: DatasetsCreateRequest
|
|
@@ -96,10 +99,10 @@ class DatasetsApi:
|
|
|
96
99
|
|
|
97
100
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
98
101
|
'201': "Dataset",
|
|
99
|
-
'400': "
|
|
100
|
-
'401': "
|
|
101
|
-
'403': "
|
|
102
|
-
'409': "
|
|
102
|
+
'400': "Problem",
|
|
103
|
+
'401': "Problem",
|
|
104
|
+
'403': "Problem",
|
|
105
|
+
'409': "Problem",
|
|
103
106
|
}
|
|
104
107
|
response_data = self.api_client.call_api(
|
|
105
108
|
*_param,
|
|
@@ -129,8 +132,9 @@ class DatasetsApi:
|
|
|
129
132
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
130
133
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
131
134
|
) -> ApiResponse[Dataset]:
|
|
132
|
-
"""Create a
|
|
135
|
+
"""Create a dataset
|
|
133
136
|
|
|
137
|
+
Create a new dataset with JSON examples. Empty datasets are not allowed. **Payload Requirements** - The dataset name must be unique within the given space. - Each item in `examples[]` may contain **any user-defined fields**. - Do not include system-managed fields on input: `id`, `created_at`, `updated_at`. Requests that contain these fields in any example **will be rejected**. - Each example **must contain at least one property** (i.e., `{}` is invalid). **Valid example** (create) ```json { \"name\": \"my-dataset\", \"space_id\": \"spc_123\", \"examples\": [ { \"question\": \"What is 2+2?\", \"answer\": \"4\", \"topic\": \"math\" }, { \"question\": \"What is the capital of Spain?\", \"answer\": \"Madrid\", \"topic\": \"geography\" }, ] } ``` **Invalid example** ('id' not allowed on create) ```json { \"name\": \"my-dataset\", \"space_id\": \"spc_123\", \"examples\": [ { \"id\": \"ex_1\", \"input\": \"Hello\" } ] } ``` <Note>This endpoint is in beta, read more [here](https://arize.com/docs/ax/rest-reference#api-version-stages).</Note>
|
|
134
138
|
|
|
135
139
|
:param datasets_create_request: Body containing dataset creation parameters (required)
|
|
136
140
|
:type datasets_create_request: DatasetsCreateRequest
|
|
@@ -166,10 +170,10 @@ class DatasetsApi:
|
|
|
166
170
|
|
|
167
171
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
168
172
|
'201': "Dataset",
|
|
169
|
-
'400': "
|
|
170
|
-
'401': "
|
|
171
|
-
'403': "
|
|
172
|
-
'409': "
|
|
173
|
+
'400': "Problem",
|
|
174
|
+
'401': "Problem",
|
|
175
|
+
'403': "Problem",
|
|
176
|
+
'409': "Problem",
|
|
173
177
|
}
|
|
174
178
|
response_data = self.api_client.call_api(
|
|
175
179
|
*_param,
|
|
@@ -199,8 +203,9 @@ class DatasetsApi:
|
|
|
199
203
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
200
204
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
201
205
|
) -> RESTResponseType:
|
|
202
|
-
"""Create a
|
|
206
|
+
"""Create a dataset
|
|
203
207
|
|
|
208
|
+
Create a new dataset with JSON examples. Empty datasets are not allowed. **Payload Requirements** - The dataset name must be unique within the given space. - Each item in `examples[]` may contain **any user-defined fields**. - Do not include system-managed fields on input: `id`, `created_at`, `updated_at`. Requests that contain these fields in any example **will be rejected**. - Each example **must contain at least one property** (i.e., `{}` is invalid). **Valid example** (create) ```json { \"name\": \"my-dataset\", \"space_id\": \"spc_123\", \"examples\": [ { \"question\": \"What is 2+2?\", \"answer\": \"4\", \"topic\": \"math\" }, { \"question\": \"What is the capital of Spain?\", \"answer\": \"Madrid\", \"topic\": \"geography\" }, ] } ``` **Invalid example** ('id' not allowed on create) ```json { \"name\": \"my-dataset\", \"space_id\": \"spc_123\", \"examples\": [ { \"id\": \"ex_1\", \"input\": \"Hello\" } ] } ``` <Note>This endpoint is in beta, read more [here](https://arize.com/docs/ax/rest-reference#api-version-stages).</Note>
|
|
204
209
|
|
|
205
210
|
:param datasets_create_request: Body containing dataset creation parameters (required)
|
|
206
211
|
:type datasets_create_request: DatasetsCreateRequest
|
|
@@ -236,10 +241,10 @@ class DatasetsApi:
|
|
|
236
241
|
|
|
237
242
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
238
243
|
'201': "Dataset",
|
|
239
|
-
'400': "
|
|
240
|
-
'401': "
|
|
241
|
-
'403': "
|
|
242
|
-
'409': "
|
|
244
|
+
'400': "Problem",
|
|
245
|
+
'401': "Problem",
|
|
246
|
+
'403': "Problem",
|
|
247
|
+
'409': "Problem",
|
|
243
248
|
}
|
|
244
249
|
response_data = self.api_client.call_api(
|
|
245
250
|
*_param,
|
|
@@ -284,7 +289,8 @@ class DatasetsApi:
|
|
|
284
289
|
if 'Accept' not in _header_params:
|
|
285
290
|
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
286
291
|
[
|
|
287
|
-
'application/json'
|
|
292
|
+
'application/json',
|
|
293
|
+
'application/problem+json'
|
|
288
294
|
]
|
|
289
295
|
)
|
|
290
296
|
|
|
@@ -304,7 +310,7 @@ class DatasetsApi:
|
|
|
304
310
|
|
|
305
311
|
# authentication setting
|
|
306
312
|
_auth_settings: List[str] = [
|
|
307
|
-
'
|
|
313
|
+
'bearerAuth'
|
|
308
314
|
]
|
|
309
315
|
|
|
310
316
|
return self.api_client.param_serialize(
|
|
@@ -342,8 +348,9 @@ class DatasetsApi:
|
|
|
342
348
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
343
349
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
344
350
|
) -> None:
|
|
345
|
-
"""Delete a dataset
|
|
351
|
+
"""Delete a dataset
|
|
346
352
|
|
|
353
|
+
Delete a dataset by its ID. This operation is irreversible. <Note>This endpoint is in beta, read more [here](https://arize.com/docs/ax/rest-reference#api-version-stages).</Note>
|
|
347
354
|
|
|
348
355
|
:param dataset_id: The unique identifier of the dataset (required)
|
|
349
356
|
:type dataset_id: str
|
|
@@ -379,12 +386,12 @@ class DatasetsApi:
|
|
|
379
386
|
|
|
380
387
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
381
388
|
'204': None,
|
|
382
|
-
'400': "
|
|
383
|
-
'401': "
|
|
384
|
-
'403': "
|
|
385
|
-
'404': "
|
|
386
|
-
'422': "
|
|
387
|
-
'429': "
|
|
389
|
+
'400': "Problem",
|
|
390
|
+
'401': "Problem",
|
|
391
|
+
'403': "Problem",
|
|
392
|
+
'404': "Problem",
|
|
393
|
+
'422': "Problem",
|
|
394
|
+
'429': "Problem",
|
|
388
395
|
}
|
|
389
396
|
response_data = self.api_client.call_api(
|
|
390
397
|
*_param,
|
|
@@ -414,8 +421,9 @@ class DatasetsApi:
|
|
|
414
421
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
415
422
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
416
423
|
) -> ApiResponse[None]:
|
|
417
|
-
"""Delete a dataset
|
|
424
|
+
"""Delete a dataset
|
|
418
425
|
|
|
426
|
+
Delete a dataset by its ID. This operation is irreversible. <Note>This endpoint is in beta, read more [here](https://arize.com/docs/ax/rest-reference#api-version-stages).</Note>
|
|
419
427
|
|
|
420
428
|
:param dataset_id: The unique identifier of the dataset (required)
|
|
421
429
|
:type dataset_id: str
|
|
@@ -451,12 +459,12 @@ class DatasetsApi:
|
|
|
451
459
|
|
|
452
460
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
453
461
|
'204': None,
|
|
454
|
-
'400': "
|
|
455
|
-
'401': "
|
|
456
|
-
'403': "
|
|
457
|
-
'404': "
|
|
458
|
-
'422': "
|
|
459
|
-
'429': "
|
|
462
|
+
'400': "Problem",
|
|
463
|
+
'401': "Problem",
|
|
464
|
+
'403': "Problem",
|
|
465
|
+
'404': "Problem",
|
|
466
|
+
'422': "Problem",
|
|
467
|
+
'429': "Problem",
|
|
460
468
|
}
|
|
461
469
|
response_data = self.api_client.call_api(
|
|
462
470
|
*_param,
|
|
@@ -486,8 +494,9 @@ class DatasetsApi:
|
|
|
486
494
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
487
495
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
488
496
|
) -> RESTResponseType:
|
|
489
|
-
"""Delete a dataset
|
|
497
|
+
"""Delete a dataset
|
|
490
498
|
|
|
499
|
+
Delete a dataset by its ID. This operation is irreversible. <Note>This endpoint is in beta, read more [here](https://arize.com/docs/ax/rest-reference#api-version-stages).</Note>
|
|
491
500
|
|
|
492
501
|
:param dataset_id: The unique identifier of the dataset (required)
|
|
493
502
|
:type dataset_id: str
|
|
@@ -523,12 +532,12 @@ class DatasetsApi:
|
|
|
523
532
|
|
|
524
533
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
525
534
|
'204': None,
|
|
526
|
-
'400': "
|
|
527
|
-
'401': "
|
|
528
|
-
'403': "
|
|
529
|
-
'404': "
|
|
530
|
-
'422': "
|
|
531
|
-
'429': "
|
|
535
|
+
'400': "Problem",
|
|
536
|
+
'401': "Problem",
|
|
537
|
+
'403': "Problem",
|
|
538
|
+
'404': "Problem",
|
|
539
|
+
'422': "Problem",
|
|
540
|
+
'429': "Problem",
|
|
532
541
|
}
|
|
533
542
|
response_data = self.api_client.call_api(
|
|
534
543
|
*_param,
|
|
@@ -562,7 +571,7 @@ class DatasetsApi:
|
|
|
562
571
|
|
|
563
572
|
# process the path parameters
|
|
564
573
|
if dataset_id is not None:
|
|
565
|
-
_path_params['
|
|
574
|
+
_path_params['dataset_id'] = dataset_id
|
|
566
575
|
# process the query parameters
|
|
567
576
|
# process the header parameters
|
|
568
577
|
# process the form parameters
|
|
@@ -573,19 +582,19 @@ class DatasetsApi:
|
|
|
573
582
|
if 'Accept' not in _header_params:
|
|
574
583
|
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
575
584
|
[
|
|
576
|
-
'application/json'
|
|
585
|
+
'application/problem+json'
|
|
577
586
|
]
|
|
578
587
|
)
|
|
579
588
|
|
|
580
589
|
|
|
581
590
|
# authentication setting
|
|
582
591
|
_auth_settings: List[str] = [
|
|
583
|
-
'
|
|
592
|
+
'bearerAuth'
|
|
584
593
|
]
|
|
585
594
|
|
|
586
595
|
return self.api_client.param_serialize(
|
|
587
596
|
method='DELETE',
|
|
588
|
-
resource_path='/v2/datasets/{
|
|
597
|
+
resource_path='/v2/datasets/{dataset_id}',
|
|
589
598
|
path_params=_path_params,
|
|
590
599
|
query_params=_query_params,
|
|
591
600
|
header_params=_header_params,
|
|
@@ -602,9 +611,10 @@ class DatasetsApi:
|
|
|
602
611
|
|
|
603
612
|
|
|
604
613
|
@validate_call
|
|
605
|
-
def
|
|
614
|
+
def datasets_examples_insert(
|
|
606
615
|
self,
|
|
607
616
|
dataset_id: Annotated[StrictStr, Field(description="The unique identifier of the dataset")],
|
|
617
|
+
datasets_examples_insert_request: Annotated[DatasetsExamplesInsertRequest, Field(description="Body containing dataset examples for insert (append) operation with auto-generated IDs")],
|
|
608
618
|
dataset_version_id: Annotated[Optional[StrictStr], Field(description="The unique identifier of the dataset version")] = None,
|
|
609
619
|
_request_timeout: Union[
|
|
610
620
|
None,
|
|
@@ -619,11 +629,14 @@ class DatasetsApi:
|
|
|
619
629
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
620
630
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
621
631
|
) -> Dataset:
|
|
622
|
-
"""
|
|
632
|
+
"""Add new examples to a dataset
|
|
623
633
|
|
|
634
|
+
Appends new examples to an existing dataset. If the dataset version is not passed, the latest version is selected. The inserted examples will be assigned autogenerated, unique IDs. **Payload Requirements** - Each item in `examples[]` may contain any user-defined fields. - Do not include system-managed fields on input: `id`, `created_at`, `updated_at`. Requests that contain these fields in any example will be rejected. - Each example must contain at least one property (i.e., `{}` is invalid). **Valid example** (create) ```json { \"examples\": [ { \"question\": \"What is 2+2?\", \"answer\": \"4\", \"topic\": \"math\" } ] } ``` **Invalid example** ('id' not allowed on create) ```json { \"examples\": [ { \"id\": \"ex_1\", \"input\": \"Hello\" } ] } ``` <Note>This endpoint is in beta, read more [here](https://arize.com/docs/ax/rest-reference#api-version-stages).</Note>
|
|
624
635
|
|
|
625
636
|
:param dataset_id: The unique identifier of the dataset (required)
|
|
626
637
|
:type dataset_id: str
|
|
638
|
+
:param datasets_examples_insert_request: Body containing dataset examples for insert (append) operation with auto-generated IDs (required)
|
|
639
|
+
:type datasets_examples_insert_request: DatasetsExamplesInsertRequest
|
|
627
640
|
:param dataset_version_id: The unique identifier of the dataset version
|
|
628
641
|
:type dataset_version_id: str
|
|
629
642
|
:param _request_timeout: timeout setting for this request. If one
|
|
@@ -648,8 +661,9 @@ class DatasetsApi:
|
|
|
648
661
|
:return: Returns the result object.
|
|
649
662
|
""" # noqa: E501
|
|
650
663
|
|
|
651
|
-
_param = self.
|
|
664
|
+
_param = self._datasets_examples_insert_serialize(
|
|
652
665
|
dataset_id=dataset_id,
|
|
666
|
+
datasets_examples_insert_request=datasets_examples_insert_request,
|
|
653
667
|
dataset_version_id=dataset_version_id,
|
|
654
668
|
_request_auth=_request_auth,
|
|
655
669
|
_content_type=_content_type,
|
|
@@ -659,12 +673,12 @@ class DatasetsApi:
|
|
|
659
673
|
|
|
660
674
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
661
675
|
'200': "Dataset",
|
|
662
|
-
'400': "
|
|
663
|
-
'401': "
|
|
664
|
-
'403': "
|
|
665
|
-
'404': "
|
|
666
|
-
'422': "
|
|
667
|
-
'429': "
|
|
676
|
+
'400': "Problem",
|
|
677
|
+
'401': "Problem",
|
|
678
|
+
'403': "Problem",
|
|
679
|
+
'404': "Problem",
|
|
680
|
+
'422': "Problem",
|
|
681
|
+
'429': "Problem",
|
|
668
682
|
}
|
|
669
683
|
response_data = self.api_client.call_api(
|
|
670
684
|
*_param,
|
|
@@ -678,9 +692,10 @@ class DatasetsApi:
|
|
|
678
692
|
|
|
679
693
|
|
|
680
694
|
@validate_call
|
|
681
|
-
def
|
|
695
|
+
def datasets_examples_insert_with_http_info(
|
|
682
696
|
self,
|
|
683
697
|
dataset_id: Annotated[StrictStr, Field(description="The unique identifier of the dataset")],
|
|
698
|
+
datasets_examples_insert_request: Annotated[DatasetsExamplesInsertRequest, Field(description="Body containing dataset examples for insert (append) operation with auto-generated IDs")],
|
|
684
699
|
dataset_version_id: Annotated[Optional[StrictStr], Field(description="The unique identifier of the dataset version")] = None,
|
|
685
700
|
_request_timeout: Union[
|
|
686
701
|
None,
|
|
@@ -695,11 +710,14 @@ class DatasetsApi:
|
|
|
695
710
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
696
711
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
697
712
|
) -> ApiResponse[Dataset]:
|
|
698
|
-
"""
|
|
713
|
+
"""Add new examples to a dataset
|
|
699
714
|
|
|
715
|
+
Appends new examples to an existing dataset. If the dataset version is not passed, the latest version is selected. The inserted examples will be assigned autogenerated, unique IDs. **Payload Requirements** - Each item in `examples[]` may contain any user-defined fields. - Do not include system-managed fields on input: `id`, `created_at`, `updated_at`. Requests that contain these fields in any example will be rejected. - Each example must contain at least one property (i.e., `{}` is invalid). **Valid example** (create) ```json { \"examples\": [ { \"question\": \"What is 2+2?\", \"answer\": \"4\", \"topic\": \"math\" } ] } ``` **Invalid example** ('id' not allowed on create) ```json { \"examples\": [ { \"id\": \"ex_1\", \"input\": \"Hello\" } ] } ``` <Note>This endpoint is in beta, read more [here](https://arize.com/docs/ax/rest-reference#api-version-stages).</Note>
|
|
700
716
|
|
|
701
717
|
:param dataset_id: The unique identifier of the dataset (required)
|
|
702
718
|
:type dataset_id: str
|
|
719
|
+
:param datasets_examples_insert_request: Body containing dataset examples for insert (append) operation with auto-generated IDs (required)
|
|
720
|
+
:type datasets_examples_insert_request: DatasetsExamplesInsertRequest
|
|
703
721
|
:param dataset_version_id: The unique identifier of the dataset version
|
|
704
722
|
:type dataset_version_id: str
|
|
705
723
|
:param _request_timeout: timeout setting for this request. If one
|
|
@@ -724,8 +742,9 @@ class DatasetsApi:
|
|
|
724
742
|
:return: Returns the result object.
|
|
725
743
|
""" # noqa: E501
|
|
726
744
|
|
|
727
|
-
_param = self.
|
|
745
|
+
_param = self._datasets_examples_insert_serialize(
|
|
728
746
|
dataset_id=dataset_id,
|
|
747
|
+
datasets_examples_insert_request=datasets_examples_insert_request,
|
|
729
748
|
dataset_version_id=dataset_version_id,
|
|
730
749
|
_request_auth=_request_auth,
|
|
731
750
|
_content_type=_content_type,
|
|
@@ -735,12 +754,12 @@ class DatasetsApi:
|
|
|
735
754
|
|
|
736
755
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
737
756
|
'200': "Dataset",
|
|
738
|
-
'400': "
|
|
739
|
-
'401': "
|
|
740
|
-
'403': "
|
|
741
|
-
'404': "
|
|
742
|
-
'422': "
|
|
743
|
-
'429': "
|
|
757
|
+
'400': "Problem",
|
|
758
|
+
'401': "Problem",
|
|
759
|
+
'403': "Problem",
|
|
760
|
+
'404': "Problem",
|
|
761
|
+
'422': "Problem",
|
|
762
|
+
'429': "Problem",
|
|
744
763
|
}
|
|
745
764
|
response_data = self.api_client.call_api(
|
|
746
765
|
*_param,
|
|
@@ -754,9 +773,10 @@ class DatasetsApi:
|
|
|
754
773
|
|
|
755
774
|
|
|
756
775
|
@validate_call
|
|
757
|
-
def
|
|
776
|
+
def datasets_examples_insert_without_preload_content(
|
|
758
777
|
self,
|
|
759
778
|
dataset_id: Annotated[StrictStr, Field(description="The unique identifier of the dataset")],
|
|
779
|
+
datasets_examples_insert_request: Annotated[DatasetsExamplesInsertRequest, Field(description="Body containing dataset examples for insert (append) operation with auto-generated IDs")],
|
|
760
780
|
dataset_version_id: Annotated[Optional[StrictStr], Field(description="The unique identifier of the dataset version")] = None,
|
|
761
781
|
_request_timeout: Union[
|
|
762
782
|
None,
|
|
@@ -771,11 +791,14 @@ class DatasetsApi:
|
|
|
771
791
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
772
792
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
773
793
|
) -> RESTResponseType:
|
|
774
|
-
"""
|
|
794
|
+
"""Add new examples to a dataset
|
|
775
795
|
|
|
796
|
+
Appends new examples to an existing dataset. If the dataset version is not passed, the latest version is selected. The inserted examples will be assigned autogenerated, unique IDs. **Payload Requirements** - Each item in `examples[]` may contain any user-defined fields. - Do not include system-managed fields on input: `id`, `created_at`, `updated_at`. Requests that contain these fields in any example will be rejected. - Each example must contain at least one property (i.e., `{}` is invalid). **Valid example** (create) ```json { \"examples\": [ { \"question\": \"What is 2+2?\", \"answer\": \"4\", \"topic\": \"math\" } ] } ``` **Invalid example** ('id' not allowed on create) ```json { \"examples\": [ { \"id\": \"ex_1\", \"input\": \"Hello\" } ] } ``` <Note>This endpoint is in beta, read more [here](https://arize.com/docs/ax/rest-reference#api-version-stages).</Note>
|
|
776
797
|
|
|
777
798
|
:param dataset_id: The unique identifier of the dataset (required)
|
|
778
799
|
:type dataset_id: str
|
|
800
|
+
:param datasets_examples_insert_request: Body containing dataset examples for insert (append) operation with auto-generated IDs (required)
|
|
801
|
+
:type datasets_examples_insert_request: DatasetsExamplesInsertRequest
|
|
779
802
|
:param dataset_version_id: The unique identifier of the dataset version
|
|
780
803
|
:type dataset_version_id: str
|
|
781
804
|
:param _request_timeout: timeout setting for this request. If one
|
|
@@ -800,8 +823,9 @@ class DatasetsApi:
|
|
|
800
823
|
:return: Returns the result object.
|
|
801
824
|
""" # noqa: E501
|
|
802
825
|
|
|
803
|
-
_param = self.
|
|
826
|
+
_param = self._datasets_examples_insert_serialize(
|
|
804
827
|
dataset_id=dataset_id,
|
|
828
|
+
datasets_examples_insert_request=datasets_examples_insert_request,
|
|
805
829
|
dataset_version_id=dataset_version_id,
|
|
806
830
|
_request_auth=_request_auth,
|
|
807
831
|
_content_type=_content_type,
|
|
@@ -811,12 +835,12 @@ class DatasetsApi:
|
|
|
811
835
|
|
|
812
836
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
813
837
|
'200': "Dataset",
|
|
814
|
-
'400': "
|
|
815
|
-
'401': "
|
|
816
|
-
'403': "
|
|
817
|
-
'404': "
|
|
818
|
-
'422': "
|
|
819
|
-
'429': "
|
|
838
|
+
'400': "Problem",
|
|
839
|
+
'401': "Problem",
|
|
840
|
+
'403': "Problem",
|
|
841
|
+
'404': "Problem",
|
|
842
|
+
'422': "Problem",
|
|
843
|
+
'429': "Problem",
|
|
820
844
|
}
|
|
821
845
|
response_data = self.api_client.call_api(
|
|
822
846
|
*_param,
|
|
@@ -825,9 +849,10 @@ class DatasetsApi:
|
|
|
825
849
|
return response_data.response
|
|
826
850
|
|
|
827
851
|
|
|
828
|
-
def
|
|
852
|
+
def _datasets_examples_insert_serialize(
|
|
829
853
|
self,
|
|
830
854
|
dataset_id,
|
|
855
|
+
datasets_examples_insert_request,
|
|
831
856
|
dataset_version_id,
|
|
832
857
|
_request_auth,
|
|
833
858
|
_content_type,
|
|
@@ -851,34 +876,50 @@ class DatasetsApi:
|
|
|
851
876
|
|
|
852
877
|
# process the path parameters
|
|
853
878
|
if dataset_id is not None:
|
|
854
|
-
_path_params['
|
|
879
|
+
_path_params['dataset_id'] = dataset_id
|
|
855
880
|
# process the query parameters
|
|
856
881
|
if dataset_version_id is not None:
|
|
857
882
|
|
|
858
|
-
_query_params.append(('
|
|
883
|
+
_query_params.append(('dataset_version_id', dataset_version_id))
|
|
859
884
|
|
|
860
885
|
# process the header parameters
|
|
861
886
|
# process the form parameters
|
|
862
887
|
# process the body parameter
|
|
888
|
+
if datasets_examples_insert_request is not None:
|
|
889
|
+
_body_params = datasets_examples_insert_request
|
|
863
890
|
|
|
864
891
|
|
|
865
892
|
# set the HTTP header `Accept`
|
|
866
893
|
if 'Accept' not in _header_params:
|
|
867
894
|
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
868
895
|
[
|
|
869
|
-
'application/json'
|
|
896
|
+
'application/json',
|
|
897
|
+
'application/problem+json'
|
|
870
898
|
]
|
|
871
899
|
)
|
|
872
900
|
|
|
901
|
+
# set the HTTP header `Content-Type`
|
|
902
|
+
if _content_type:
|
|
903
|
+
_header_params['Content-Type'] = _content_type
|
|
904
|
+
else:
|
|
905
|
+
_default_content_type = (
|
|
906
|
+
self.api_client.select_header_content_type(
|
|
907
|
+
[
|
|
908
|
+
'application/json'
|
|
909
|
+
]
|
|
910
|
+
)
|
|
911
|
+
)
|
|
912
|
+
if _default_content_type is not None:
|
|
913
|
+
_header_params['Content-Type'] = _default_content_type
|
|
873
914
|
|
|
874
915
|
# authentication setting
|
|
875
916
|
_auth_settings: List[str] = [
|
|
876
|
-
'
|
|
917
|
+
'bearerAuth'
|
|
877
918
|
]
|
|
878
919
|
|
|
879
920
|
return self.api_client.param_serialize(
|
|
880
|
-
method='
|
|
881
|
-
resource_path='/v2/datasets/{
|
|
921
|
+
method='POST',
|
|
922
|
+
resource_path='/v2/datasets/{dataset_id}/examples',
|
|
882
923
|
path_params=_path_params,
|
|
883
924
|
query_params=_query_params,
|
|
884
925
|
header_params=_header_params,
|
|
@@ -895,10 +936,11 @@ class DatasetsApi:
|
|
|
895
936
|
|
|
896
937
|
|
|
897
938
|
@validate_call
|
|
898
|
-
def
|
|
939
|
+
def datasets_examples_list(
|
|
899
940
|
self,
|
|
900
|
-
|
|
901
|
-
|
|
941
|
+
dataset_id: Annotated[StrictStr, Field(description="The unique identifier of the dataset")],
|
|
942
|
+
dataset_version_id: Annotated[Optional[StrictStr], Field(description="The unique identifier of the dataset version")] = None,
|
|
943
|
+
limit: Annotated[Optional[Annotated[int, Field(le=10000, strict=True, ge=1)]], Field(description="Maximum items to return")] = None,
|
|
902
944
|
_request_timeout: Union[
|
|
903
945
|
None,
|
|
904
946
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -911,13 +953,16 @@ class DatasetsApi:
|
|
|
911
953
|
_content_type: Optional[StrictStr] = None,
|
|
912
954
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
913
955
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
914
|
-
) ->
|
|
915
|
-
"""List
|
|
956
|
+
) -> DatasetsExamplesList200Response:
|
|
957
|
+
"""List dataset examples
|
|
916
958
|
|
|
959
|
+
List examples for a given dataset and version. If version is not passed, the latest version is selected. Examples are sorted by insertion order. **Pagination**: - Response includes `pagination` for forward compatibility. - **Currently not implemented**: `pagination.next_cursor` is omitted - When pagination is enabled in the future, the behavior will match other list endpoints (cursor-based, opaque tokens). <Note>This endpoint is in beta, read more [here](https://arize.com/docs/ax/rest-reference#api-version-stages).</Note>
|
|
917
960
|
|
|
918
|
-
:param
|
|
919
|
-
:type
|
|
920
|
-
:param
|
|
961
|
+
:param dataset_id: The unique identifier of the dataset (required)
|
|
962
|
+
:type dataset_id: str
|
|
963
|
+
:param dataset_version_id: The unique identifier of the dataset version
|
|
964
|
+
:type dataset_version_id: str
|
|
965
|
+
:param limit: Maximum items to return
|
|
921
966
|
:type limit: int
|
|
922
967
|
:param _request_timeout: timeout setting for this request. If one
|
|
923
968
|
number provided, it will be total request
|
|
@@ -941,8 +986,9 @@ class DatasetsApi:
|
|
|
941
986
|
:return: Returns the result object.
|
|
942
987
|
""" # noqa: E501
|
|
943
988
|
|
|
944
|
-
_param = self.
|
|
945
|
-
|
|
989
|
+
_param = self._datasets_examples_list_serialize(
|
|
990
|
+
dataset_id=dataset_id,
|
|
991
|
+
dataset_version_id=dataset_version_id,
|
|
946
992
|
limit=limit,
|
|
947
993
|
_request_auth=_request_auth,
|
|
948
994
|
_content_type=_content_type,
|
|
@@ -951,12 +997,13 @@ class DatasetsApi:
|
|
|
951
997
|
)
|
|
952
998
|
|
|
953
999
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
954
|
-
'200': "
|
|
955
|
-
'400': "
|
|
956
|
-
'401': "
|
|
957
|
-
'403': "
|
|
958
|
-
'
|
|
959
|
-
'
|
|
1000
|
+
'200': "DatasetsExamplesList200Response",
|
|
1001
|
+
'400': "Problem",
|
|
1002
|
+
'401': "Problem",
|
|
1003
|
+
'403': "Problem",
|
|
1004
|
+
'404': "Problem",
|
|
1005
|
+
'422': "Problem",
|
|
1006
|
+
'429': "Problem",
|
|
960
1007
|
}
|
|
961
1008
|
response_data = self.api_client.call_api(
|
|
962
1009
|
*_param,
|
|
@@ -970,10 +1017,11 @@ class DatasetsApi:
|
|
|
970
1017
|
|
|
971
1018
|
|
|
972
1019
|
@validate_call
|
|
973
|
-
def
|
|
1020
|
+
def datasets_examples_list_with_http_info(
|
|
974
1021
|
self,
|
|
975
|
-
|
|
976
|
-
|
|
1022
|
+
dataset_id: Annotated[StrictStr, Field(description="The unique identifier of the dataset")],
|
|
1023
|
+
dataset_version_id: Annotated[Optional[StrictStr], Field(description="The unique identifier of the dataset version")] = None,
|
|
1024
|
+
limit: Annotated[Optional[Annotated[int, Field(le=10000, strict=True, ge=1)]], Field(description="Maximum items to return")] = None,
|
|
977
1025
|
_request_timeout: Union[
|
|
978
1026
|
None,
|
|
979
1027
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -986,13 +1034,16 @@ class DatasetsApi:
|
|
|
986
1034
|
_content_type: Optional[StrictStr] = None,
|
|
987
1035
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
988
1036
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
989
|
-
) -> ApiResponse[
|
|
990
|
-
"""List
|
|
1037
|
+
) -> ApiResponse[DatasetsExamplesList200Response]:
|
|
1038
|
+
"""List dataset examples
|
|
991
1039
|
|
|
1040
|
+
List examples for a given dataset and version. If version is not passed, the latest version is selected. Examples are sorted by insertion order. **Pagination**: - Response includes `pagination` for forward compatibility. - **Currently not implemented**: `pagination.next_cursor` is omitted - When pagination is enabled in the future, the behavior will match other list endpoints (cursor-based, opaque tokens). <Note>This endpoint is in beta, read more [here](https://arize.com/docs/ax/rest-reference#api-version-stages).</Note>
|
|
992
1041
|
|
|
993
|
-
:param
|
|
994
|
-
:type
|
|
995
|
-
:param
|
|
1042
|
+
:param dataset_id: The unique identifier of the dataset (required)
|
|
1043
|
+
:type dataset_id: str
|
|
1044
|
+
:param dataset_version_id: The unique identifier of the dataset version
|
|
1045
|
+
:type dataset_version_id: str
|
|
1046
|
+
:param limit: Maximum items to return
|
|
996
1047
|
:type limit: int
|
|
997
1048
|
:param _request_timeout: timeout setting for this request. If one
|
|
998
1049
|
number provided, it will be total request
|
|
@@ -1016,8 +1067,9 @@ class DatasetsApi:
|
|
|
1016
1067
|
:return: Returns the result object.
|
|
1017
1068
|
""" # noqa: E501
|
|
1018
1069
|
|
|
1019
|
-
_param = self.
|
|
1020
|
-
|
|
1070
|
+
_param = self._datasets_examples_list_serialize(
|
|
1071
|
+
dataset_id=dataset_id,
|
|
1072
|
+
dataset_version_id=dataset_version_id,
|
|
1021
1073
|
limit=limit,
|
|
1022
1074
|
_request_auth=_request_auth,
|
|
1023
1075
|
_content_type=_content_type,
|
|
@@ -1026,12 +1078,13 @@ class DatasetsApi:
|
|
|
1026
1078
|
)
|
|
1027
1079
|
|
|
1028
1080
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
1029
|
-
'200': "
|
|
1030
|
-
'400': "
|
|
1031
|
-
'401': "
|
|
1032
|
-
'403': "
|
|
1033
|
-
'
|
|
1034
|
-
'
|
|
1081
|
+
'200': "DatasetsExamplesList200Response",
|
|
1082
|
+
'400': "Problem",
|
|
1083
|
+
'401': "Problem",
|
|
1084
|
+
'403': "Problem",
|
|
1085
|
+
'404': "Problem",
|
|
1086
|
+
'422': "Problem",
|
|
1087
|
+
'429': "Problem",
|
|
1035
1088
|
}
|
|
1036
1089
|
response_data = self.api_client.call_api(
|
|
1037
1090
|
*_param,
|
|
@@ -1045,10 +1098,11 @@ class DatasetsApi:
|
|
|
1045
1098
|
|
|
1046
1099
|
|
|
1047
1100
|
@validate_call
|
|
1048
|
-
def
|
|
1101
|
+
def datasets_examples_list_without_preload_content(
|
|
1049
1102
|
self,
|
|
1050
|
-
|
|
1051
|
-
|
|
1103
|
+
dataset_id: Annotated[StrictStr, Field(description="The unique identifier of the dataset")],
|
|
1104
|
+
dataset_version_id: Annotated[Optional[StrictStr], Field(description="The unique identifier of the dataset version")] = None,
|
|
1105
|
+
limit: Annotated[Optional[Annotated[int, Field(le=10000, strict=True, ge=1)]], Field(description="Maximum items to return")] = None,
|
|
1052
1106
|
_request_timeout: Union[
|
|
1053
1107
|
None,
|
|
1054
1108
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -1062,12 +1116,15 @@ class DatasetsApi:
|
|
|
1062
1116
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1063
1117
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1064
1118
|
) -> RESTResponseType:
|
|
1065
|
-
"""List
|
|
1119
|
+
"""List dataset examples
|
|
1066
1120
|
|
|
1121
|
+
List examples for a given dataset and version. If version is not passed, the latest version is selected. Examples are sorted by insertion order. **Pagination**: - Response includes `pagination` for forward compatibility. - **Currently not implemented**: `pagination.next_cursor` is omitted - When pagination is enabled in the future, the behavior will match other list endpoints (cursor-based, opaque tokens). <Note>This endpoint is in beta, read more [here](https://arize.com/docs/ax/rest-reference#api-version-stages).</Note>
|
|
1067
1122
|
|
|
1068
|
-
:param
|
|
1069
|
-
:type
|
|
1070
|
-
:param
|
|
1123
|
+
:param dataset_id: The unique identifier of the dataset (required)
|
|
1124
|
+
:type dataset_id: str
|
|
1125
|
+
:param dataset_version_id: The unique identifier of the dataset version
|
|
1126
|
+
:type dataset_version_id: str
|
|
1127
|
+
:param limit: Maximum items to return
|
|
1071
1128
|
:type limit: int
|
|
1072
1129
|
:param _request_timeout: timeout setting for this request. If one
|
|
1073
1130
|
number provided, it will be total request
|
|
@@ -1091,8 +1148,9 @@ class DatasetsApi:
|
|
|
1091
1148
|
:return: Returns the result object.
|
|
1092
1149
|
""" # noqa: E501
|
|
1093
1150
|
|
|
1094
|
-
_param = self.
|
|
1095
|
-
|
|
1151
|
+
_param = self._datasets_examples_list_serialize(
|
|
1152
|
+
dataset_id=dataset_id,
|
|
1153
|
+
dataset_version_id=dataset_version_id,
|
|
1096
1154
|
limit=limit,
|
|
1097
1155
|
_request_auth=_request_auth,
|
|
1098
1156
|
_content_type=_content_type,
|
|
@@ -1101,12 +1159,13 @@ class DatasetsApi:
|
|
|
1101
1159
|
)
|
|
1102
1160
|
|
|
1103
1161
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
1104
|
-
'200': "
|
|
1105
|
-
'400': "
|
|
1106
|
-
'401': "
|
|
1107
|
-
'403': "
|
|
1108
|
-
'
|
|
1109
|
-
'
|
|
1162
|
+
'200': "DatasetsExamplesList200Response",
|
|
1163
|
+
'400': "Problem",
|
|
1164
|
+
'401': "Problem",
|
|
1165
|
+
'403': "Problem",
|
|
1166
|
+
'404': "Problem",
|
|
1167
|
+
'422': "Problem",
|
|
1168
|
+
'429': "Problem",
|
|
1110
1169
|
}
|
|
1111
1170
|
response_data = self.api_client.call_api(
|
|
1112
1171
|
*_param,
|
|
@@ -1115,9 +1174,10 @@ class DatasetsApi:
|
|
|
1115
1174
|
return response_data.response
|
|
1116
1175
|
|
|
1117
1176
|
|
|
1118
|
-
def
|
|
1177
|
+
def _datasets_examples_list_serialize(
|
|
1119
1178
|
self,
|
|
1120
|
-
|
|
1179
|
+
dataset_id,
|
|
1180
|
+
dataset_version_id,
|
|
1121
1181
|
limit,
|
|
1122
1182
|
_request_auth,
|
|
1123
1183
|
_content_type,
|
|
@@ -1140,10 +1200,12 @@ class DatasetsApi:
|
|
|
1140
1200
|
_body_params: Optional[bytes] = None
|
|
1141
1201
|
|
|
1142
1202
|
# process the path parameters
|
|
1203
|
+
if dataset_id is not None:
|
|
1204
|
+
_path_params['dataset_id'] = dataset_id
|
|
1143
1205
|
# process the query parameters
|
|
1144
|
-
if
|
|
1206
|
+
if dataset_version_id is not None:
|
|
1145
1207
|
|
|
1146
|
-
_query_params.append(('
|
|
1208
|
+
_query_params.append(('dataset_version_id', dataset_version_id))
|
|
1147
1209
|
|
|
1148
1210
|
if limit is not None:
|
|
1149
1211
|
|
|
@@ -1158,19 +1220,20 @@ class DatasetsApi:
|
|
|
1158
1220
|
if 'Accept' not in _header_params:
|
|
1159
1221
|
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
1160
1222
|
[
|
|
1161
|
-
'application/json'
|
|
1223
|
+
'application/json',
|
|
1224
|
+
'application/problem+json'
|
|
1162
1225
|
]
|
|
1163
1226
|
)
|
|
1164
1227
|
|
|
1165
1228
|
|
|
1166
1229
|
# authentication setting
|
|
1167
1230
|
_auth_settings: List[str] = [
|
|
1168
|
-
'
|
|
1231
|
+
'bearerAuth'
|
|
1169
1232
|
]
|
|
1170
1233
|
|
|
1171
1234
|
return self.api_client.param_serialize(
|
|
1172
1235
|
method='GET',
|
|
1173
|
-
resource_path='/v2/datasets',
|
|
1236
|
+
resource_path='/v2/datasets/{dataset_id}/examples',
|
|
1174
1237
|
path_params=_path_params,
|
|
1175
1238
|
query_params=_query_params,
|
|
1176
1239
|
header_params=_header_params,
|
|
@@ -1187,11 +1250,11 @@ class DatasetsApi:
|
|
|
1187
1250
|
|
|
1188
1251
|
|
|
1189
1252
|
@validate_call
|
|
1190
|
-
def
|
|
1253
|
+
def datasets_examples_update(
|
|
1191
1254
|
self,
|
|
1192
1255
|
dataset_id: Annotated[StrictStr, Field(description="The unique identifier of the dataset")],
|
|
1256
|
+
datasets_examples_update_request: Annotated[DatasetsExamplesUpdateRequest, Field(description="Body containing dataset examples for update operation by ID matching")],
|
|
1193
1257
|
dataset_version_id: Annotated[Optional[StrictStr], Field(description="The unique identifier of the dataset version")] = None,
|
|
1194
|
-
limit: Annotated[Optional[StrictInt], Field(description="Maximum number of items to return")] = None,
|
|
1195
1258
|
_request_timeout: Union[
|
|
1196
1259
|
None,
|
|
1197
1260
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -1204,16 +1267,17 @@ class DatasetsApi:
|
|
|
1204
1267
|
_content_type: Optional[StrictStr] = None,
|
|
1205
1268
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1206
1269
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1207
|
-
) ->
|
|
1208
|
-
"""
|
|
1270
|
+
) -> Dataset:
|
|
1271
|
+
"""Update existing examples in a dataset
|
|
1209
1272
|
|
|
1273
|
+
Updates existing dataset examples by matching their `id` field. an example ID does not match any existing example in the dataset version, it will be ignored. In other words, only examples with IDs that already exist will be updated. To add new examples, use the Insert Dataset Examples endpoint. Adding columns that do not exist in the dataset schema is allowed, but removing existing columns is not. Optionally, the update can create a new version of the dataset. In this case, the outcome of the update will be reflected only in the new version, while the previous version remains unchanged. If a new version is not created, the updates will be applied directly (in place) to the specified version. **Payload Requirements** - Each item in `examples[]` may contain any user-defined fields. - Each item in `examples[]` must include the `id` field to identify the example to update. - Do not include system-managed fields on input: `created_at`, `updated_at`. Requests that contain these fields in any example will be rejected. - Each example must contain at least one property (i.e., `{}` is invalid). **Valid example** (create) ```json { \"examples\": [ { \"id\": \"ex_001\", \"question\": \"What is 2+2?\", \"answer\": \"4\", \"topic\": \"math\" } ] } ``` **Invalid example** ('id' missing for update) ```json { \"examples\": [ { \"input\": \"Hello\" } ] } ``` <Note>This endpoint is in beta, read more [here](https://arize.com/docs/ax/rest-reference#api-version-stages).</Note>
|
|
1210
1274
|
|
|
1211
1275
|
:param dataset_id: The unique identifier of the dataset (required)
|
|
1212
1276
|
:type dataset_id: str
|
|
1277
|
+
:param datasets_examples_update_request: Body containing dataset examples for update operation by ID matching (required)
|
|
1278
|
+
:type datasets_examples_update_request: DatasetsExamplesUpdateRequest
|
|
1213
1279
|
:param dataset_version_id: The unique identifier of the dataset version
|
|
1214
1280
|
:type dataset_version_id: str
|
|
1215
|
-
:param limit: Maximum number of items to return
|
|
1216
|
-
:type limit: int
|
|
1217
1281
|
:param _request_timeout: timeout setting for this request. If one
|
|
1218
1282
|
number provided, it will be total request
|
|
1219
1283
|
timeout. It can also be a pair (tuple) of
|
|
@@ -1236,10 +1300,10 @@ class DatasetsApi:
|
|
|
1236
1300
|
:return: Returns the result object.
|
|
1237
1301
|
""" # noqa: E501
|
|
1238
1302
|
|
|
1239
|
-
_param = self.
|
|
1303
|
+
_param = self._datasets_examples_update_serialize(
|
|
1240
1304
|
dataset_id=dataset_id,
|
|
1305
|
+
datasets_examples_update_request=datasets_examples_update_request,
|
|
1241
1306
|
dataset_version_id=dataset_version_id,
|
|
1242
|
-
limit=limit,
|
|
1243
1307
|
_request_auth=_request_auth,
|
|
1244
1308
|
_content_type=_content_type,
|
|
1245
1309
|
_headers=_headers,
|
|
@@ -1247,13 +1311,14 @@ class DatasetsApi:
|
|
|
1247
1311
|
)
|
|
1248
1312
|
|
|
1249
1313
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
1250
|
-
'200': "
|
|
1251
|
-
'400': "
|
|
1252
|
-
'401': "
|
|
1253
|
-
'403': "
|
|
1254
|
-
'404': "
|
|
1255
|
-
'
|
|
1256
|
-
'
|
|
1314
|
+
'200': "Dataset",
|
|
1315
|
+
'400': "Problem",
|
|
1316
|
+
'401': "Problem",
|
|
1317
|
+
'403': "Problem",
|
|
1318
|
+
'404': "Problem",
|
|
1319
|
+
'409': "Problem",
|
|
1320
|
+
'422': "Problem",
|
|
1321
|
+
'429': "Problem",
|
|
1257
1322
|
}
|
|
1258
1323
|
response_data = self.api_client.call_api(
|
|
1259
1324
|
*_param,
|
|
@@ -1267,11 +1332,11 @@ class DatasetsApi:
|
|
|
1267
1332
|
|
|
1268
1333
|
|
|
1269
1334
|
@validate_call
|
|
1270
|
-
def
|
|
1335
|
+
def datasets_examples_update_with_http_info(
|
|
1271
1336
|
self,
|
|
1272
1337
|
dataset_id: Annotated[StrictStr, Field(description="The unique identifier of the dataset")],
|
|
1338
|
+
datasets_examples_update_request: Annotated[DatasetsExamplesUpdateRequest, Field(description="Body containing dataset examples for update operation by ID matching")],
|
|
1273
1339
|
dataset_version_id: Annotated[Optional[StrictStr], Field(description="The unique identifier of the dataset version")] = None,
|
|
1274
|
-
limit: Annotated[Optional[StrictInt], Field(description="Maximum number of items to return")] = None,
|
|
1275
1340
|
_request_timeout: Union[
|
|
1276
1341
|
None,
|
|
1277
1342
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -1284,16 +1349,17 @@ class DatasetsApi:
|
|
|
1284
1349
|
_content_type: Optional[StrictStr] = None,
|
|
1285
1350
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1286
1351
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1287
|
-
) -> ApiResponse[
|
|
1288
|
-
"""
|
|
1352
|
+
) -> ApiResponse[Dataset]:
|
|
1353
|
+
"""Update existing examples in a dataset
|
|
1289
1354
|
|
|
1355
|
+
Updates existing dataset examples by matching their `id` field. an example ID does not match any existing example in the dataset version, it will be ignored. In other words, only examples with IDs that already exist will be updated. To add new examples, use the Insert Dataset Examples endpoint. Adding columns that do not exist in the dataset schema is allowed, but removing existing columns is not. Optionally, the update can create a new version of the dataset. In this case, the outcome of the update will be reflected only in the new version, while the previous version remains unchanged. If a new version is not created, the updates will be applied directly (in place) to the specified version. **Payload Requirements** - Each item in `examples[]` may contain any user-defined fields. - Each item in `examples[]` must include the `id` field to identify the example to update. - Do not include system-managed fields on input: `created_at`, `updated_at`. Requests that contain these fields in any example will be rejected. - Each example must contain at least one property (i.e., `{}` is invalid). **Valid example** (create) ```json { \"examples\": [ { \"id\": \"ex_001\", \"question\": \"What is 2+2?\", \"answer\": \"4\", \"topic\": \"math\" } ] } ``` **Invalid example** ('id' missing for update) ```json { \"examples\": [ { \"input\": \"Hello\" } ] } ``` <Note>This endpoint is in beta, read more [here](https://arize.com/docs/ax/rest-reference#api-version-stages).</Note>
|
|
1290
1356
|
|
|
1291
1357
|
:param dataset_id: The unique identifier of the dataset (required)
|
|
1292
1358
|
:type dataset_id: str
|
|
1359
|
+
:param datasets_examples_update_request: Body containing dataset examples for update operation by ID matching (required)
|
|
1360
|
+
:type datasets_examples_update_request: DatasetsExamplesUpdateRequest
|
|
1293
1361
|
:param dataset_version_id: The unique identifier of the dataset version
|
|
1294
1362
|
:type dataset_version_id: str
|
|
1295
|
-
:param limit: Maximum number of items to return
|
|
1296
|
-
:type limit: int
|
|
1297
1363
|
:param _request_timeout: timeout setting for this request. If one
|
|
1298
1364
|
number provided, it will be total request
|
|
1299
1365
|
timeout. It can also be a pair (tuple) of
|
|
@@ -1316,10 +1382,10 @@ class DatasetsApi:
|
|
|
1316
1382
|
:return: Returns the result object.
|
|
1317
1383
|
""" # noqa: E501
|
|
1318
1384
|
|
|
1319
|
-
_param = self.
|
|
1385
|
+
_param = self._datasets_examples_update_serialize(
|
|
1320
1386
|
dataset_id=dataset_id,
|
|
1387
|
+
datasets_examples_update_request=datasets_examples_update_request,
|
|
1321
1388
|
dataset_version_id=dataset_version_id,
|
|
1322
|
-
limit=limit,
|
|
1323
1389
|
_request_auth=_request_auth,
|
|
1324
1390
|
_content_type=_content_type,
|
|
1325
1391
|
_headers=_headers,
|
|
@@ -1327,13 +1393,14 @@ class DatasetsApi:
|
|
|
1327
1393
|
)
|
|
1328
1394
|
|
|
1329
1395
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
1330
|
-
'200': "
|
|
1331
|
-
'400': "
|
|
1332
|
-
'401': "
|
|
1333
|
-
'403': "
|
|
1334
|
-
'404': "
|
|
1335
|
-
'
|
|
1336
|
-
'
|
|
1396
|
+
'200': "Dataset",
|
|
1397
|
+
'400': "Problem",
|
|
1398
|
+
'401': "Problem",
|
|
1399
|
+
'403': "Problem",
|
|
1400
|
+
'404': "Problem",
|
|
1401
|
+
'409': "Problem",
|
|
1402
|
+
'422': "Problem",
|
|
1403
|
+
'429': "Problem",
|
|
1337
1404
|
}
|
|
1338
1405
|
response_data = self.api_client.call_api(
|
|
1339
1406
|
*_param,
|
|
@@ -1347,11 +1414,11 @@ class DatasetsApi:
|
|
|
1347
1414
|
|
|
1348
1415
|
|
|
1349
1416
|
@validate_call
|
|
1350
|
-
def
|
|
1417
|
+
def datasets_examples_update_without_preload_content(
|
|
1351
1418
|
self,
|
|
1352
1419
|
dataset_id: Annotated[StrictStr, Field(description="The unique identifier of the dataset")],
|
|
1420
|
+
datasets_examples_update_request: Annotated[DatasetsExamplesUpdateRequest, Field(description="Body containing dataset examples for update operation by ID matching")],
|
|
1353
1421
|
dataset_version_id: Annotated[Optional[StrictStr], Field(description="The unique identifier of the dataset version")] = None,
|
|
1354
|
-
limit: Annotated[Optional[StrictInt], Field(description="Maximum number of items to return")] = None,
|
|
1355
1422
|
_request_timeout: Union[
|
|
1356
1423
|
None,
|
|
1357
1424
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -1365,15 +1432,16 @@ class DatasetsApi:
|
|
|
1365
1432
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1366
1433
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1367
1434
|
) -> RESTResponseType:
|
|
1368
|
-
"""
|
|
1435
|
+
"""Update existing examples in a dataset
|
|
1369
1436
|
|
|
1437
|
+
Updates existing dataset examples by matching their `id` field. an example ID does not match any existing example in the dataset version, it will be ignored. In other words, only examples with IDs that already exist will be updated. To add new examples, use the Insert Dataset Examples endpoint. Adding columns that do not exist in the dataset schema is allowed, but removing existing columns is not. Optionally, the update can create a new version of the dataset. In this case, the outcome of the update will be reflected only in the new version, while the previous version remains unchanged. If a new version is not created, the updates will be applied directly (in place) to the specified version. **Payload Requirements** - Each item in `examples[]` may contain any user-defined fields. - Each item in `examples[]` must include the `id` field to identify the example to update. - Do not include system-managed fields on input: `created_at`, `updated_at`. Requests that contain these fields in any example will be rejected. - Each example must contain at least one property (i.e., `{}` is invalid). **Valid example** (create) ```json { \"examples\": [ { \"id\": \"ex_001\", \"question\": \"What is 2+2?\", \"answer\": \"4\", \"topic\": \"math\" } ] } ``` **Invalid example** ('id' missing for update) ```json { \"examples\": [ { \"input\": \"Hello\" } ] } ``` <Note>This endpoint is in beta, read more [here](https://arize.com/docs/ax/rest-reference#api-version-stages).</Note>
|
|
1370
1438
|
|
|
1371
1439
|
:param dataset_id: The unique identifier of the dataset (required)
|
|
1372
1440
|
:type dataset_id: str
|
|
1441
|
+
:param datasets_examples_update_request: Body containing dataset examples for update operation by ID matching (required)
|
|
1442
|
+
:type datasets_examples_update_request: DatasetsExamplesUpdateRequest
|
|
1373
1443
|
:param dataset_version_id: The unique identifier of the dataset version
|
|
1374
1444
|
:type dataset_version_id: str
|
|
1375
|
-
:param limit: Maximum number of items to return
|
|
1376
|
-
:type limit: int
|
|
1377
1445
|
:param _request_timeout: timeout setting for this request. If one
|
|
1378
1446
|
number provided, it will be total request
|
|
1379
1447
|
timeout. It can also be a pair (tuple) of
|
|
@@ -1396,10 +1464,10 @@ class DatasetsApi:
|
|
|
1396
1464
|
:return: Returns the result object.
|
|
1397
1465
|
""" # noqa: E501
|
|
1398
1466
|
|
|
1399
|
-
_param = self.
|
|
1467
|
+
_param = self._datasets_examples_update_serialize(
|
|
1400
1468
|
dataset_id=dataset_id,
|
|
1469
|
+
datasets_examples_update_request=datasets_examples_update_request,
|
|
1401
1470
|
dataset_version_id=dataset_version_id,
|
|
1402
|
-
limit=limit,
|
|
1403
1471
|
_request_auth=_request_auth,
|
|
1404
1472
|
_content_type=_content_type,
|
|
1405
1473
|
_headers=_headers,
|
|
@@ -1407,13 +1475,14 @@ class DatasetsApi:
|
|
|
1407
1475
|
)
|
|
1408
1476
|
|
|
1409
1477
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
1410
|
-
'200': "
|
|
1411
|
-
'400': "
|
|
1412
|
-
'401': "
|
|
1413
|
-
'403': "
|
|
1414
|
-
'404': "
|
|
1415
|
-
'
|
|
1416
|
-
'
|
|
1478
|
+
'200': "Dataset",
|
|
1479
|
+
'400': "Problem",
|
|
1480
|
+
'401': "Problem",
|
|
1481
|
+
'403': "Problem",
|
|
1482
|
+
'404': "Problem",
|
|
1483
|
+
'409': "Problem",
|
|
1484
|
+
'422': "Problem",
|
|
1485
|
+
'429': "Problem",
|
|
1417
1486
|
}
|
|
1418
1487
|
response_data = self.api_client.call_api(
|
|
1419
1488
|
*_param,
|
|
@@ -1422,11 +1491,11 @@ class DatasetsApi:
|
|
|
1422
1491
|
return response_data.response
|
|
1423
1492
|
|
|
1424
1493
|
|
|
1425
|
-
def
|
|
1494
|
+
def _datasets_examples_update_serialize(
|
|
1426
1495
|
self,
|
|
1427
1496
|
dataset_id,
|
|
1497
|
+
datasets_examples_update_request,
|
|
1428
1498
|
dataset_version_id,
|
|
1429
|
-
limit,
|
|
1430
1499
|
_request_auth,
|
|
1431
1500
|
_content_type,
|
|
1432
1501
|
_headers,
|
|
@@ -1449,38 +1518,643 @@ class DatasetsApi:
|
|
|
1449
1518
|
|
|
1450
1519
|
# process the path parameters
|
|
1451
1520
|
if dataset_id is not None:
|
|
1452
|
-
_path_params['
|
|
1521
|
+
_path_params['dataset_id'] = dataset_id
|
|
1453
1522
|
# process the query parameters
|
|
1454
1523
|
if dataset_version_id is not None:
|
|
1455
1524
|
|
|
1456
|
-
_query_params.append(('
|
|
1457
|
-
|
|
1458
|
-
if limit is not None:
|
|
1459
|
-
|
|
1460
|
-
_query_params.append(('limit', limit))
|
|
1525
|
+
_query_params.append(('dataset_version_id', dataset_version_id))
|
|
1461
1526
|
|
|
1462
1527
|
# process the header parameters
|
|
1463
1528
|
# process the form parameters
|
|
1464
1529
|
# process the body parameter
|
|
1530
|
+
if datasets_examples_update_request is not None:
|
|
1531
|
+
_body_params = datasets_examples_update_request
|
|
1465
1532
|
|
|
1466
1533
|
|
|
1467
1534
|
# set the HTTP header `Accept`
|
|
1468
1535
|
if 'Accept' not in _header_params:
|
|
1469
1536
|
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
1470
1537
|
[
|
|
1471
|
-
'application/json'
|
|
1538
|
+
'application/json',
|
|
1539
|
+
'application/problem+json'
|
|
1472
1540
|
]
|
|
1473
1541
|
)
|
|
1474
1542
|
|
|
1543
|
+
# set the HTTP header `Content-Type`
|
|
1544
|
+
if _content_type:
|
|
1545
|
+
_header_params['Content-Type'] = _content_type
|
|
1546
|
+
else:
|
|
1547
|
+
_default_content_type = (
|
|
1548
|
+
self.api_client.select_header_content_type(
|
|
1549
|
+
[
|
|
1550
|
+
'application/json'
|
|
1551
|
+
]
|
|
1552
|
+
)
|
|
1553
|
+
)
|
|
1554
|
+
if _default_content_type is not None:
|
|
1555
|
+
_header_params['Content-Type'] = _default_content_type
|
|
1475
1556
|
|
|
1476
1557
|
# authentication setting
|
|
1477
1558
|
_auth_settings: List[str] = [
|
|
1478
|
-
'
|
|
1559
|
+
'bearerAuth'
|
|
1479
1560
|
]
|
|
1480
1561
|
|
|
1481
1562
|
return self.api_client.param_serialize(
|
|
1482
|
-
method='
|
|
1483
|
-
resource_path='/v2/datasets/{
|
|
1563
|
+
method='PATCH',
|
|
1564
|
+
resource_path='/v2/datasets/{dataset_id}/examples',
|
|
1565
|
+
path_params=_path_params,
|
|
1566
|
+
query_params=_query_params,
|
|
1567
|
+
header_params=_header_params,
|
|
1568
|
+
body=_body_params,
|
|
1569
|
+
post_params=_form_params,
|
|
1570
|
+
files=_files,
|
|
1571
|
+
auth_settings=_auth_settings,
|
|
1572
|
+
collection_formats=_collection_formats,
|
|
1573
|
+
_host=_host,
|
|
1574
|
+
_request_auth=_request_auth
|
|
1575
|
+
)
|
|
1576
|
+
|
|
1577
|
+
|
|
1578
|
+
|
|
1579
|
+
|
|
1580
|
+
@validate_call
|
|
1581
|
+
def datasets_get(
|
|
1582
|
+
self,
|
|
1583
|
+
dataset_id: Annotated[StrictStr, Field(description="The unique identifier of the dataset")],
|
|
1584
|
+
_request_timeout: Union[
|
|
1585
|
+
None,
|
|
1586
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1587
|
+
Tuple[
|
|
1588
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1589
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1590
|
+
]
|
|
1591
|
+
] = None,
|
|
1592
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1593
|
+
_content_type: Optional[StrictStr] = None,
|
|
1594
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1595
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1596
|
+
) -> Dataset:
|
|
1597
|
+
"""Get a dataset
|
|
1598
|
+
|
|
1599
|
+
Get a dataset object by its ID. This includes the dataset's versions, sorted by creation date, with the most recently-created version first. This endpoint does not include the dataset's examples. To get the examples of a specific dataset version, use the List Dataset Examples endpoint. <Note>This endpoint is in beta, read more [here](https://arize.com/docs/ax/rest-reference#api-version-stages).</Note>
|
|
1600
|
+
|
|
1601
|
+
:param dataset_id: The unique identifier of the dataset (required)
|
|
1602
|
+
:type dataset_id: str
|
|
1603
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1604
|
+
number provided, it will be total request
|
|
1605
|
+
timeout. It can also be a pair (tuple) of
|
|
1606
|
+
(connection, read) timeouts.
|
|
1607
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1608
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1609
|
+
request; this effectively ignores the
|
|
1610
|
+
authentication in the spec for a single request.
|
|
1611
|
+
:type _request_auth: dict, optional
|
|
1612
|
+
:param _content_type: force content-type for the request.
|
|
1613
|
+
:type _content_type: str, Optional
|
|
1614
|
+
:param _headers: set to override the headers for a single
|
|
1615
|
+
request; this effectively ignores the headers
|
|
1616
|
+
in the spec for a single request.
|
|
1617
|
+
:type _headers: dict, optional
|
|
1618
|
+
:param _host_index: set to override the host_index for a single
|
|
1619
|
+
request; this effectively ignores the host_index
|
|
1620
|
+
in the spec for a single request.
|
|
1621
|
+
:type _host_index: int, optional
|
|
1622
|
+
:return: Returns the result object.
|
|
1623
|
+
""" # noqa: E501
|
|
1624
|
+
|
|
1625
|
+
_param = self._datasets_get_serialize(
|
|
1626
|
+
dataset_id=dataset_id,
|
|
1627
|
+
_request_auth=_request_auth,
|
|
1628
|
+
_content_type=_content_type,
|
|
1629
|
+
_headers=_headers,
|
|
1630
|
+
_host_index=_host_index
|
|
1631
|
+
)
|
|
1632
|
+
|
|
1633
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1634
|
+
'200': "Dataset",
|
|
1635
|
+
'400': "Problem",
|
|
1636
|
+
'401': "Problem",
|
|
1637
|
+
'403': "Problem",
|
|
1638
|
+
'404': "Problem",
|
|
1639
|
+
'422': "Problem",
|
|
1640
|
+
'429': "Problem",
|
|
1641
|
+
}
|
|
1642
|
+
response_data = self.api_client.call_api(
|
|
1643
|
+
*_param,
|
|
1644
|
+
_request_timeout=_request_timeout
|
|
1645
|
+
)
|
|
1646
|
+
response_data.read()
|
|
1647
|
+
return self.api_client.response_deserialize(
|
|
1648
|
+
response_data=response_data,
|
|
1649
|
+
response_types_map=_response_types_map,
|
|
1650
|
+
).data
|
|
1651
|
+
|
|
1652
|
+
|
|
1653
|
+
@validate_call
|
|
1654
|
+
def datasets_get_with_http_info(
|
|
1655
|
+
self,
|
|
1656
|
+
dataset_id: Annotated[StrictStr, Field(description="The unique identifier of the dataset")],
|
|
1657
|
+
_request_timeout: Union[
|
|
1658
|
+
None,
|
|
1659
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1660
|
+
Tuple[
|
|
1661
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1662
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1663
|
+
]
|
|
1664
|
+
] = None,
|
|
1665
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1666
|
+
_content_type: Optional[StrictStr] = None,
|
|
1667
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1668
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1669
|
+
) -> ApiResponse[Dataset]:
|
|
1670
|
+
"""Get a dataset
|
|
1671
|
+
|
|
1672
|
+
Get a dataset object by its ID. This includes the dataset's versions, sorted by creation date, with the most recently-created version first. This endpoint does not include the dataset's examples. To get the examples of a specific dataset version, use the List Dataset Examples endpoint. <Note>This endpoint is in beta, read more [here](https://arize.com/docs/ax/rest-reference#api-version-stages).</Note>
|
|
1673
|
+
|
|
1674
|
+
:param dataset_id: The unique identifier of the dataset (required)
|
|
1675
|
+
:type dataset_id: str
|
|
1676
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1677
|
+
number provided, it will be total request
|
|
1678
|
+
timeout. It can also be a pair (tuple) of
|
|
1679
|
+
(connection, read) timeouts.
|
|
1680
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1681
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1682
|
+
request; this effectively ignores the
|
|
1683
|
+
authentication in the spec for a single request.
|
|
1684
|
+
:type _request_auth: dict, optional
|
|
1685
|
+
:param _content_type: force content-type for the request.
|
|
1686
|
+
:type _content_type: str, Optional
|
|
1687
|
+
:param _headers: set to override the headers for a single
|
|
1688
|
+
request; this effectively ignores the headers
|
|
1689
|
+
in the spec for a single request.
|
|
1690
|
+
:type _headers: dict, optional
|
|
1691
|
+
:param _host_index: set to override the host_index for a single
|
|
1692
|
+
request; this effectively ignores the host_index
|
|
1693
|
+
in the spec for a single request.
|
|
1694
|
+
:type _host_index: int, optional
|
|
1695
|
+
:return: Returns the result object.
|
|
1696
|
+
""" # noqa: E501
|
|
1697
|
+
|
|
1698
|
+
_param = self._datasets_get_serialize(
|
|
1699
|
+
dataset_id=dataset_id,
|
|
1700
|
+
_request_auth=_request_auth,
|
|
1701
|
+
_content_type=_content_type,
|
|
1702
|
+
_headers=_headers,
|
|
1703
|
+
_host_index=_host_index
|
|
1704
|
+
)
|
|
1705
|
+
|
|
1706
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1707
|
+
'200': "Dataset",
|
|
1708
|
+
'400': "Problem",
|
|
1709
|
+
'401': "Problem",
|
|
1710
|
+
'403': "Problem",
|
|
1711
|
+
'404': "Problem",
|
|
1712
|
+
'422': "Problem",
|
|
1713
|
+
'429': "Problem",
|
|
1714
|
+
}
|
|
1715
|
+
response_data = self.api_client.call_api(
|
|
1716
|
+
*_param,
|
|
1717
|
+
_request_timeout=_request_timeout
|
|
1718
|
+
)
|
|
1719
|
+
response_data.read()
|
|
1720
|
+
return self.api_client.response_deserialize(
|
|
1721
|
+
response_data=response_data,
|
|
1722
|
+
response_types_map=_response_types_map,
|
|
1723
|
+
)
|
|
1724
|
+
|
|
1725
|
+
|
|
1726
|
+
@validate_call
|
|
1727
|
+
def datasets_get_without_preload_content(
|
|
1728
|
+
self,
|
|
1729
|
+
dataset_id: Annotated[StrictStr, Field(description="The unique identifier of the dataset")],
|
|
1730
|
+
_request_timeout: Union[
|
|
1731
|
+
None,
|
|
1732
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1733
|
+
Tuple[
|
|
1734
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1735
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1736
|
+
]
|
|
1737
|
+
] = None,
|
|
1738
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1739
|
+
_content_type: Optional[StrictStr] = None,
|
|
1740
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1741
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1742
|
+
) -> RESTResponseType:
|
|
1743
|
+
"""Get a dataset
|
|
1744
|
+
|
|
1745
|
+
Get a dataset object by its ID. This includes the dataset's versions, sorted by creation date, with the most recently-created version first. This endpoint does not include the dataset's examples. To get the examples of a specific dataset version, use the List Dataset Examples endpoint. <Note>This endpoint is in beta, read more [here](https://arize.com/docs/ax/rest-reference#api-version-stages).</Note>
|
|
1746
|
+
|
|
1747
|
+
:param dataset_id: The unique identifier of the dataset (required)
|
|
1748
|
+
:type dataset_id: str
|
|
1749
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1750
|
+
number provided, it will be total request
|
|
1751
|
+
timeout. It can also be a pair (tuple) of
|
|
1752
|
+
(connection, read) timeouts.
|
|
1753
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1754
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1755
|
+
request; this effectively ignores the
|
|
1756
|
+
authentication in the spec for a single request.
|
|
1757
|
+
:type _request_auth: dict, optional
|
|
1758
|
+
:param _content_type: force content-type for the request.
|
|
1759
|
+
:type _content_type: str, Optional
|
|
1760
|
+
:param _headers: set to override the headers for a single
|
|
1761
|
+
request; this effectively ignores the headers
|
|
1762
|
+
in the spec for a single request.
|
|
1763
|
+
:type _headers: dict, optional
|
|
1764
|
+
:param _host_index: set to override the host_index for a single
|
|
1765
|
+
request; this effectively ignores the host_index
|
|
1766
|
+
in the spec for a single request.
|
|
1767
|
+
:type _host_index: int, optional
|
|
1768
|
+
:return: Returns the result object.
|
|
1769
|
+
""" # noqa: E501
|
|
1770
|
+
|
|
1771
|
+
_param = self._datasets_get_serialize(
|
|
1772
|
+
dataset_id=dataset_id,
|
|
1773
|
+
_request_auth=_request_auth,
|
|
1774
|
+
_content_type=_content_type,
|
|
1775
|
+
_headers=_headers,
|
|
1776
|
+
_host_index=_host_index
|
|
1777
|
+
)
|
|
1778
|
+
|
|
1779
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1780
|
+
'200': "Dataset",
|
|
1781
|
+
'400': "Problem",
|
|
1782
|
+
'401': "Problem",
|
|
1783
|
+
'403': "Problem",
|
|
1784
|
+
'404': "Problem",
|
|
1785
|
+
'422': "Problem",
|
|
1786
|
+
'429': "Problem",
|
|
1787
|
+
}
|
|
1788
|
+
response_data = self.api_client.call_api(
|
|
1789
|
+
*_param,
|
|
1790
|
+
_request_timeout=_request_timeout
|
|
1791
|
+
)
|
|
1792
|
+
return response_data.response
|
|
1793
|
+
|
|
1794
|
+
|
|
1795
|
+
def _datasets_get_serialize(
|
|
1796
|
+
self,
|
|
1797
|
+
dataset_id,
|
|
1798
|
+
_request_auth,
|
|
1799
|
+
_content_type,
|
|
1800
|
+
_headers,
|
|
1801
|
+
_host_index,
|
|
1802
|
+
) -> RequestSerialized:
|
|
1803
|
+
|
|
1804
|
+
_host = None
|
|
1805
|
+
|
|
1806
|
+
_collection_formats: Dict[str, str] = {
|
|
1807
|
+
}
|
|
1808
|
+
|
|
1809
|
+
_path_params: Dict[str, str] = {}
|
|
1810
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1811
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1812
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1813
|
+
_files: Dict[
|
|
1814
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
1815
|
+
] = {}
|
|
1816
|
+
_body_params: Optional[bytes] = None
|
|
1817
|
+
|
|
1818
|
+
# process the path parameters
|
|
1819
|
+
if dataset_id is not None:
|
|
1820
|
+
_path_params['dataset_id'] = dataset_id
|
|
1821
|
+
# process the query parameters
|
|
1822
|
+
# process the header parameters
|
|
1823
|
+
# process the form parameters
|
|
1824
|
+
# process the body parameter
|
|
1825
|
+
|
|
1826
|
+
|
|
1827
|
+
# set the HTTP header `Accept`
|
|
1828
|
+
if 'Accept' not in _header_params:
|
|
1829
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
1830
|
+
[
|
|
1831
|
+
'application/json',
|
|
1832
|
+
'application/problem+json'
|
|
1833
|
+
]
|
|
1834
|
+
)
|
|
1835
|
+
|
|
1836
|
+
|
|
1837
|
+
# authentication setting
|
|
1838
|
+
_auth_settings: List[str] = [
|
|
1839
|
+
'bearerAuth'
|
|
1840
|
+
]
|
|
1841
|
+
|
|
1842
|
+
return self.api_client.param_serialize(
|
|
1843
|
+
method='GET',
|
|
1844
|
+
resource_path='/v2/datasets/{dataset_id}',
|
|
1845
|
+
path_params=_path_params,
|
|
1846
|
+
query_params=_query_params,
|
|
1847
|
+
header_params=_header_params,
|
|
1848
|
+
body=_body_params,
|
|
1849
|
+
post_params=_form_params,
|
|
1850
|
+
files=_files,
|
|
1851
|
+
auth_settings=_auth_settings,
|
|
1852
|
+
collection_formats=_collection_formats,
|
|
1853
|
+
_host=_host,
|
|
1854
|
+
_request_auth=_request_auth
|
|
1855
|
+
)
|
|
1856
|
+
|
|
1857
|
+
|
|
1858
|
+
|
|
1859
|
+
|
|
1860
|
+
@validate_call
|
|
1861
|
+
def datasets_list(
|
|
1862
|
+
self,
|
|
1863
|
+
space_id: Annotated[Optional[StrictStr], Field(description="Filter search results to a particular space ID")] = None,
|
|
1864
|
+
limit: Annotated[Optional[Annotated[int, Field(le=500, strict=True, ge=1)]], Field(description="Maximum items to return")] = None,
|
|
1865
|
+
cursor: Annotated[Optional[StrictStr], Field(description="Opaque pagination cursor returned from a previous response (`pagination.next_cursor`). Treat it as an unreadable token; do not attempt to parse or construct it. ")] = None,
|
|
1866
|
+
_request_timeout: Union[
|
|
1867
|
+
None,
|
|
1868
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1869
|
+
Tuple[
|
|
1870
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1871
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1872
|
+
]
|
|
1873
|
+
] = None,
|
|
1874
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1875
|
+
_content_type: Optional[StrictStr] = None,
|
|
1876
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1877
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1878
|
+
) -> DatasetsList200Response:
|
|
1879
|
+
"""List datasets
|
|
1880
|
+
|
|
1881
|
+
List datasets the user has access to. The datasets are sorted by creation date, with the most recently created datasets coming first. The dataset versions are not included in this response. To get the versions of a specific dataset, use the Get Dataset by ID endpoint. <Note>This endpoint is in beta, read more [here](https://arize.com/docs/ax/rest-reference#api-version-stages).</Note>
|
|
1882
|
+
|
|
1883
|
+
:param space_id: Filter search results to a particular space ID
|
|
1884
|
+
:type space_id: str
|
|
1885
|
+
:param limit: Maximum items to return
|
|
1886
|
+
:type limit: int
|
|
1887
|
+
:param cursor: Opaque pagination cursor returned from a previous response (`pagination.next_cursor`). Treat it as an unreadable token; do not attempt to parse or construct it.
|
|
1888
|
+
:type cursor: str
|
|
1889
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1890
|
+
number provided, it will be total request
|
|
1891
|
+
timeout. It can also be a pair (tuple) of
|
|
1892
|
+
(connection, read) timeouts.
|
|
1893
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1894
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1895
|
+
request; this effectively ignores the
|
|
1896
|
+
authentication in the spec for a single request.
|
|
1897
|
+
:type _request_auth: dict, optional
|
|
1898
|
+
:param _content_type: force content-type for the request.
|
|
1899
|
+
:type _content_type: str, Optional
|
|
1900
|
+
:param _headers: set to override the headers for a single
|
|
1901
|
+
request; this effectively ignores the headers
|
|
1902
|
+
in the spec for a single request.
|
|
1903
|
+
:type _headers: dict, optional
|
|
1904
|
+
:param _host_index: set to override the host_index for a single
|
|
1905
|
+
request; this effectively ignores the host_index
|
|
1906
|
+
in the spec for a single request.
|
|
1907
|
+
:type _host_index: int, optional
|
|
1908
|
+
:return: Returns the result object.
|
|
1909
|
+
""" # noqa: E501
|
|
1910
|
+
|
|
1911
|
+
_param = self._datasets_list_serialize(
|
|
1912
|
+
space_id=space_id,
|
|
1913
|
+
limit=limit,
|
|
1914
|
+
cursor=cursor,
|
|
1915
|
+
_request_auth=_request_auth,
|
|
1916
|
+
_content_type=_content_type,
|
|
1917
|
+
_headers=_headers,
|
|
1918
|
+
_host_index=_host_index
|
|
1919
|
+
)
|
|
1920
|
+
|
|
1921
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1922
|
+
'200': "DatasetsList200Response",
|
|
1923
|
+
'400': "Problem",
|
|
1924
|
+
'401': "Problem",
|
|
1925
|
+
'403': "Problem",
|
|
1926
|
+
'422': "Problem",
|
|
1927
|
+
'429': "Problem",
|
|
1928
|
+
}
|
|
1929
|
+
response_data = self.api_client.call_api(
|
|
1930
|
+
*_param,
|
|
1931
|
+
_request_timeout=_request_timeout
|
|
1932
|
+
)
|
|
1933
|
+
response_data.read()
|
|
1934
|
+
return self.api_client.response_deserialize(
|
|
1935
|
+
response_data=response_data,
|
|
1936
|
+
response_types_map=_response_types_map,
|
|
1937
|
+
).data
|
|
1938
|
+
|
|
1939
|
+
|
|
1940
|
+
@validate_call
|
|
1941
|
+
def datasets_list_with_http_info(
|
|
1942
|
+
self,
|
|
1943
|
+
space_id: Annotated[Optional[StrictStr], Field(description="Filter search results to a particular space ID")] = None,
|
|
1944
|
+
limit: Annotated[Optional[Annotated[int, Field(le=500, strict=True, ge=1)]], Field(description="Maximum items to return")] = None,
|
|
1945
|
+
cursor: Annotated[Optional[StrictStr], Field(description="Opaque pagination cursor returned from a previous response (`pagination.next_cursor`). Treat it as an unreadable token; do not attempt to parse or construct it. ")] = None,
|
|
1946
|
+
_request_timeout: Union[
|
|
1947
|
+
None,
|
|
1948
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1949
|
+
Tuple[
|
|
1950
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1951
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1952
|
+
]
|
|
1953
|
+
] = None,
|
|
1954
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1955
|
+
_content_type: Optional[StrictStr] = None,
|
|
1956
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1957
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1958
|
+
) -> ApiResponse[DatasetsList200Response]:
|
|
1959
|
+
"""List datasets
|
|
1960
|
+
|
|
1961
|
+
List datasets the user has access to. The datasets are sorted by creation date, with the most recently created datasets coming first. The dataset versions are not included in this response. To get the versions of a specific dataset, use the Get Dataset by ID endpoint. <Note>This endpoint is in beta, read more [here](https://arize.com/docs/ax/rest-reference#api-version-stages).</Note>
|
|
1962
|
+
|
|
1963
|
+
:param space_id: Filter search results to a particular space ID
|
|
1964
|
+
:type space_id: str
|
|
1965
|
+
:param limit: Maximum items to return
|
|
1966
|
+
:type limit: int
|
|
1967
|
+
:param cursor: Opaque pagination cursor returned from a previous response (`pagination.next_cursor`). Treat it as an unreadable token; do not attempt to parse or construct it.
|
|
1968
|
+
:type cursor: str
|
|
1969
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1970
|
+
number provided, it will be total request
|
|
1971
|
+
timeout. It can also be a pair (tuple) of
|
|
1972
|
+
(connection, read) timeouts.
|
|
1973
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1974
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1975
|
+
request; this effectively ignores the
|
|
1976
|
+
authentication in the spec for a single request.
|
|
1977
|
+
:type _request_auth: dict, optional
|
|
1978
|
+
:param _content_type: force content-type for the request.
|
|
1979
|
+
:type _content_type: str, Optional
|
|
1980
|
+
:param _headers: set to override the headers for a single
|
|
1981
|
+
request; this effectively ignores the headers
|
|
1982
|
+
in the spec for a single request.
|
|
1983
|
+
:type _headers: dict, optional
|
|
1984
|
+
:param _host_index: set to override the host_index for a single
|
|
1985
|
+
request; this effectively ignores the host_index
|
|
1986
|
+
in the spec for a single request.
|
|
1987
|
+
:type _host_index: int, optional
|
|
1988
|
+
:return: Returns the result object.
|
|
1989
|
+
""" # noqa: E501
|
|
1990
|
+
|
|
1991
|
+
_param = self._datasets_list_serialize(
|
|
1992
|
+
space_id=space_id,
|
|
1993
|
+
limit=limit,
|
|
1994
|
+
cursor=cursor,
|
|
1995
|
+
_request_auth=_request_auth,
|
|
1996
|
+
_content_type=_content_type,
|
|
1997
|
+
_headers=_headers,
|
|
1998
|
+
_host_index=_host_index
|
|
1999
|
+
)
|
|
2000
|
+
|
|
2001
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2002
|
+
'200': "DatasetsList200Response",
|
|
2003
|
+
'400': "Problem",
|
|
2004
|
+
'401': "Problem",
|
|
2005
|
+
'403': "Problem",
|
|
2006
|
+
'422': "Problem",
|
|
2007
|
+
'429': "Problem",
|
|
2008
|
+
}
|
|
2009
|
+
response_data = self.api_client.call_api(
|
|
2010
|
+
*_param,
|
|
2011
|
+
_request_timeout=_request_timeout
|
|
2012
|
+
)
|
|
2013
|
+
response_data.read()
|
|
2014
|
+
return self.api_client.response_deserialize(
|
|
2015
|
+
response_data=response_data,
|
|
2016
|
+
response_types_map=_response_types_map,
|
|
2017
|
+
)
|
|
2018
|
+
|
|
2019
|
+
|
|
2020
|
+
@validate_call
|
|
2021
|
+
def datasets_list_without_preload_content(
|
|
2022
|
+
self,
|
|
2023
|
+
space_id: Annotated[Optional[StrictStr], Field(description="Filter search results to a particular space ID")] = None,
|
|
2024
|
+
limit: Annotated[Optional[Annotated[int, Field(le=500, strict=True, ge=1)]], Field(description="Maximum items to return")] = None,
|
|
2025
|
+
cursor: Annotated[Optional[StrictStr], Field(description="Opaque pagination cursor returned from a previous response (`pagination.next_cursor`). Treat it as an unreadable token; do not attempt to parse or construct it. ")] = None,
|
|
2026
|
+
_request_timeout: Union[
|
|
2027
|
+
None,
|
|
2028
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2029
|
+
Tuple[
|
|
2030
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
2031
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
2032
|
+
]
|
|
2033
|
+
] = None,
|
|
2034
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
2035
|
+
_content_type: Optional[StrictStr] = None,
|
|
2036
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
2037
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
2038
|
+
) -> RESTResponseType:
|
|
2039
|
+
"""List datasets
|
|
2040
|
+
|
|
2041
|
+
List datasets the user has access to. The datasets are sorted by creation date, with the most recently created datasets coming first. The dataset versions are not included in this response. To get the versions of a specific dataset, use the Get Dataset by ID endpoint. <Note>This endpoint is in beta, read more [here](https://arize.com/docs/ax/rest-reference#api-version-stages).</Note>
|
|
2042
|
+
|
|
2043
|
+
:param space_id: Filter search results to a particular space ID
|
|
2044
|
+
:type space_id: str
|
|
2045
|
+
:param limit: Maximum items to return
|
|
2046
|
+
:type limit: int
|
|
2047
|
+
:param cursor: Opaque pagination cursor returned from a previous response (`pagination.next_cursor`). Treat it as an unreadable token; do not attempt to parse or construct it.
|
|
2048
|
+
:type cursor: str
|
|
2049
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
2050
|
+
number provided, it will be total request
|
|
2051
|
+
timeout. It can also be a pair (tuple) of
|
|
2052
|
+
(connection, read) timeouts.
|
|
2053
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
2054
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
2055
|
+
request; this effectively ignores the
|
|
2056
|
+
authentication in the spec for a single request.
|
|
2057
|
+
:type _request_auth: dict, optional
|
|
2058
|
+
:param _content_type: force content-type for the request.
|
|
2059
|
+
:type _content_type: str, Optional
|
|
2060
|
+
:param _headers: set to override the headers for a single
|
|
2061
|
+
request; this effectively ignores the headers
|
|
2062
|
+
in the spec for a single request.
|
|
2063
|
+
:type _headers: dict, optional
|
|
2064
|
+
:param _host_index: set to override the host_index for a single
|
|
2065
|
+
request; this effectively ignores the host_index
|
|
2066
|
+
in the spec for a single request.
|
|
2067
|
+
:type _host_index: int, optional
|
|
2068
|
+
:return: Returns the result object.
|
|
2069
|
+
""" # noqa: E501
|
|
2070
|
+
|
|
2071
|
+
_param = self._datasets_list_serialize(
|
|
2072
|
+
space_id=space_id,
|
|
2073
|
+
limit=limit,
|
|
2074
|
+
cursor=cursor,
|
|
2075
|
+
_request_auth=_request_auth,
|
|
2076
|
+
_content_type=_content_type,
|
|
2077
|
+
_headers=_headers,
|
|
2078
|
+
_host_index=_host_index
|
|
2079
|
+
)
|
|
2080
|
+
|
|
2081
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
2082
|
+
'200': "DatasetsList200Response",
|
|
2083
|
+
'400': "Problem",
|
|
2084
|
+
'401': "Problem",
|
|
2085
|
+
'403': "Problem",
|
|
2086
|
+
'422': "Problem",
|
|
2087
|
+
'429': "Problem",
|
|
2088
|
+
}
|
|
2089
|
+
response_data = self.api_client.call_api(
|
|
2090
|
+
*_param,
|
|
2091
|
+
_request_timeout=_request_timeout
|
|
2092
|
+
)
|
|
2093
|
+
return response_data.response
|
|
2094
|
+
|
|
2095
|
+
|
|
2096
|
+
def _datasets_list_serialize(
|
|
2097
|
+
self,
|
|
2098
|
+
space_id,
|
|
2099
|
+
limit,
|
|
2100
|
+
cursor,
|
|
2101
|
+
_request_auth,
|
|
2102
|
+
_content_type,
|
|
2103
|
+
_headers,
|
|
2104
|
+
_host_index,
|
|
2105
|
+
) -> RequestSerialized:
|
|
2106
|
+
|
|
2107
|
+
_host = None
|
|
2108
|
+
|
|
2109
|
+
_collection_formats: Dict[str, str] = {
|
|
2110
|
+
}
|
|
2111
|
+
|
|
2112
|
+
_path_params: Dict[str, str] = {}
|
|
2113
|
+
_query_params: List[Tuple[str, str]] = []
|
|
2114
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
2115
|
+
_form_params: List[Tuple[str, str]] = []
|
|
2116
|
+
_files: Dict[
|
|
2117
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
2118
|
+
] = {}
|
|
2119
|
+
_body_params: Optional[bytes] = None
|
|
2120
|
+
|
|
2121
|
+
# process the path parameters
|
|
2122
|
+
# process the query parameters
|
|
2123
|
+
if space_id is not None:
|
|
2124
|
+
|
|
2125
|
+
_query_params.append(('space_id', space_id))
|
|
2126
|
+
|
|
2127
|
+
if limit is not None:
|
|
2128
|
+
|
|
2129
|
+
_query_params.append(('limit', limit))
|
|
2130
|
+
|
|
2131
|
+
if cursor is not None:
|
|
2132
|
+
|
|
2133
|
+
_query_params.append(('cursor', cursor))
|
|
2134
|
+
|
|
2135
|
+
# process the header parameters
|
|
2136
|
+
# process the form parameters
|
|
2137
|
+
# process the body parameter
|
|
2138
|
+
|
|
2139
|
+
|
|
2140
|
+
# set the HTTP header `Accept`
|
|
2141
|
+
if 'Accept' not in _header_params:
|
|
2142
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
2143
|
+
[
|
|
2144
|
+
'application/json',
|
|
2145
|
+
'application/problem+json'
|
|
2146
|
+
]
|
|
2147
|
+
)
|
|
2148
|
+
|
|
2149
|
+
|
|
2150
|
+
# authentication setting
|
|
2151
|
+
_auth_settings: List[str] = [
|
|
2152
|
+
'bearerAuth'
|
|
2153
|
+
]
|
|
2154
|
+
|
|
2155
|
+
return self.api_client.param_serialize(
|
|
2156
|
+
method='GET',
|
|
2157
|
+
resource_path='/v2/datasets',
|
|
1484
2158
|
path_params=_path_params,
|
|
1485
2159
|
query_params=_query_params,
|
|
1486
2160
|
header_params=_header_params,
|