arize 8.0.0a22__py3-none-any.whl → 8.0.0b0__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 +28 -19
- arize/_exporter/client.py +56 -37
- 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 +181 -58
- arize/config.py +324 -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 +304 -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 +43 -18
- arize/embeddings/tabular_generators.py +46 -31
- 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 +13 -0
- arize/experiments/client.py +394 -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/ml/__init__.py +1 -0
- arize/ml/batch_validation/__init__.py +1 -0
- arize/{models → ml}/batch_validation/errors.py +545 -67
- arize/{models → ml}/batch_validation/validator.py +344 -303
- arize/ml/bounded_executor.py +47 -0
- arize/{models → ml}/casting.py +118 -108
- arize/{models → ml}/client.py +339 -118
- arize/{models → ml}/proto.py +97 -42
- arize/{models → ml}/stream_validation.py +43 -15
- arize/ml/surrogate_explainer/__init__.py +1 -0
- arize/{models → ml}/surrogate_explainer/mimic.py +25 -10
- arize/{types.py → ml/types.py} +355 -354
- arize/pre_releases.py +44 -0
- arize/projects/__init__.py +1 -0
- arize/projects/client.py +134 -0
- arize/regions.py +40 -0
- arize/spans/__init__.py +1 -0
- arize/spans/client.py +204 -175
- arize/spans/columns.py +13 -0
- arize/spans/conversion.py +60 -37
- 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 +81 -14
- 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 +35 -14
- arize/spans/validation/spans/spans_validation.py +35 -4
- arize/spans/validation/spans/value_validation.py +78 -8
- arize/utils/__init__.py +1 -0
- arize/utils/arrow.py +31 -15
- arize/utils/cache.py +34 -6
- arize/utils/dataframe.py +20 -3
- arize/utils/online_tasks/__init__.py +2 -0
- arize/utils/online_tasks/dataframe_preprocessor.py +58 -47
- arize/utils/openinference_conversion.py +44 -5
- arize/utils/proto.py +10 -0
- arize/utils/size.py +5 -3
- arize/utils/types.py +105 -0
- arize/version.py +3 -1
- {arize-8.0.0a22.dist-info → arize-8.0.0b0.dist-info}/METADATA +13 -6
- arize-8.0.0b0.dist-info/RECORD +175 -0
- {arize-8.0.0a22.dist-info → arize-8.0.0b0.dist-info}/WHEEL +1 -1
- arize-8.0.0b0.dist-info/licenses/LICENSE +176 -0
- arize-8.0.0b0.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/models/__init__.py +0 -0
- arize/models/batch_validation/__init__.py +0 -0
- arize/models/bounded_executor.py +0 -34
- arize/models/surrogate_explainer/__init__.py +0 -0
- 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.
|
|
@@ -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.
|
|
@@ -113,7 +113,7 @@ HTTPSignatureAuthSetting = TypedDict(
|
|
|
113
113
|
AuthSettings = TypedDict(
|
|
114
114
|
"AuthSettings",
|
|
115
115
|
{
|
|
116
|
-
"
|
|
116
|
+
"bearerAuth": BearerFormatAuthSetting,
|
|
117
117
|
},
|
|
118
118
|
total=False,
|
|
119
119
|
)
|
|
@@ -163,27 +163,10 @@ class Configuration:
|
|
|
163
163
|
:param retries: Number of retries for API requests.
|
|
164
164
|
:param ca_cert_data: verify the peer using concatenated CA certificate data
|
|
165
165
|
in PEM (str) or DER (bytes) format.
|
|
166
|
+
:param cert_file: the path to a client certificate file, for mTLS.
|
|
167
|
+
:param key_file: the path to a client key file, for mTLS.
|
|
166
168
|
|
|
167
169
|
:Example:
|
|
168
|
-
|
|
169
|
-
API Key Authentication Example.
|
|
170
|
-
Given the following security scheme in the OpenAPI specification:
|
|
171
|
-
components:
|
|
172
|
-
securitySchemes:
|
|
173
|
-
cookieAuth: # name for the security scheme
|
|
174
|
-
type: apiKey
|
|
175
|
-
in: cookie
|
|
176
|
-
name: JSESSIONID # cookie name
|
|
177
|
-
|
|
178
|
-
You can programmatically set the cookie:
|
|
179
|
-
|
|
180
|
-
conf = arize._generated.api_client.Configuration(
|
|
181
|
-
api_key={'cookieAuth': 'abc123'}
|
|
182
|
-
api_key_prefix={'cookieAuth': 'JSESSIONID'}
|
|
183
|
-
)
|
|
184
|
-
|
|
185
|
-
The following cookie will be added to the HTTP request:
|
|
186
|
-
Cookie: JSESSIONID abc123
|
|
187
170
|
"""
|
|
188
171
|
|
|
189
172
|
_default: ClassVar[Optional[Self]] = None
|
|
@@ -204,12 +187,14 @@ conf = arize._generated.api_client.Configuration(
|
|
|
204
187
|
ssl_ca_cert: Optional[str]=None,
|
|
205
188
|
retries: Optional[int] = None,
|
|
206
189
|
ca_cert_data: Optional[Union[str, bytes]] = None,
|
|
190
|
+
cert_file: Optional[str]=None,
|
|
191
|
+
key_file: Optional[str]=None,
|
|
207
192
|
*,
|
|
208
193
|
debug: Optional[bool] = None,
|
|
209
194
|
) -> None:
|
|
210
195
|
"""Constructor
|
|
211
196
|
"""
|
|
212
|
-
self._base_path = "
|
|
197
|
+
self._base_path = "https://api.arize.com" if host is None else host
|
|
213
198
|
"""Default Base url
|
|
214
199
|
"""
|
|
215
200
|
self.server_index = 0 if server_index is None and host is None else server_index
|
|
@@ -285,10 +270,10 @@ conf = arize._generated.api_client.Configuration(
|
|
|
285
270
|
"""Set this to verify the peer using PEM (str) or DER (bytes)
|
|
286
271
|
certificate data.
|
|
287
272
|
"""
|
|
288
|
-
self.cert_file =
|
|
273
|
+
self.cert_file = cert_file
|
|
289
274
|
"""client certificate file
|
|
290
275
|
"""
|
|
291
|
-
self.key_file =
|
|
276
|
+
self.key_file = key_file
|
|
292
277
|
"""client key file
|
|
293
278
|
"""
|
|
294
279
|
self.assert_hostname = None
|
|
@@ -511,14 +496,13 @@ conf = arize._generated.api_client.Configuration(
|
|
|
511
496
|
:return: The Auth Settings information dict.
|
|
512
497
|
"""
|
|
513
498
|
auth: AuthSettings = {}
|
|
514
|
-
if
|
|
515
|
-
auth['
|
|
516
|
-
'type': '
|
|
499
|
+
if self.access_token is not None:
|
|
500
|
+
auth['bearerAuth'] = {
|
|
501
|
+
'type': 'bearer',
|
|
517
502
|
'in': 'header',
|
|
503
|
+
'format': '<api-key>',
|
|
518
504
|
'key': 'Authorization',
|
|
519
|
-
'value': self.
|
|
520
|
-
'ApiKeyAuth',
|
|
521
|
-
),
|
|
505
|
+
'value': 'Bearer ' + self.access_token
|
|
522
506
|
}
|
|
523
507
|
return auth
|
|
524
508
|
|
|
@@ -530,7 +514,7 @@ conf = arize._generated.api_client.Configuration(
|
|
|
530
514
|
return "Python SDK Debug Report:\n"\
|
|
531
515
|
"OS: {env}\n"\
|
|
532
516
|
"Python Version: {pyversion}\n"\
|
|
533
|
-
"Version of the API: 0.0
|
|
517
|
+
"Version of the API: 2.0.0\n"\
|
|
534
518
|
"SDK Package Version: 1.0.0".\
|
|
535
519
|
format(env=sys.platform, pyversion=sys.version)
|
|
536
520
|
|
|
@@ -541,8 +525,32 @@ conf = arize._generated.api_client.Configuration(
|
|
|
541
525
|
"""
|
|
542
526
|
return [
|
|
543
527
|
{
|
|
544
|
-
'url': "",
|
|
545
|
-
'description': "
|
|
528
|
+
'url': "https://api.arize.com",
|
|
529
|
+
'description': "Global",
|
|
530
|
+
},
|
|
531
|
+
{
|
|
532
|
+
'url': "https://api.{region}.arize.com",
|
|
533
|
+
'description': "Regional",
|
|
534
|
+
'variables': {
|
|
535
|
+
'region': {
|
|
536
|
+
'description': "No description provided",
|
|
537
|
+
'default_value': "eu-west-1a",
|
|
538
|
+
'enum_values': [
|
|
539
|
+
"eu-west-1a",
|
|
540
|
+
"ca-central-1a"
|
|
541
|
+
]
|
|
542
|
+
}
|
|
543
|
+
}
|
|
544
|
+
},
|
|
545
|
+
{
|
|
546
|
+
'url': "https://{host}",
|
|
547
|
+
'description': "Custom Host",
|
|
548
|
+
'variables': {
|
|
549
|
+
'host': {
|
|
550
|
+
'description': "No description provided",
|
|
551
|
+
'default_value': "api.arize.com",
|
|
552
|
+
}
|
|
553
|
+
}
|
|
546
554
|
}
|
|
547
555
|
]
|
|
548
556
|
|
|
@@ -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.
|
|
@@ -4,9 +4,9 @@
|
|
|
4
4
|
"""
|
|
5
5
|
Arize REST API
|
|
6
6
|
|
|
7
|
-
API specification for the backend data server. The API is hosted globally at https://api.arize.com/v2 or in your own environment.
|
|
7
|
+
API specification for the backend data server. The API is hosted globally at https://api.arize.com/v2 or in your own environment.
|
|
8
8
|
|
|
9
|
-
The version of the OpenAPI document: 0.0
|
|
9
|
+
The version of the OpenAPI document: 2.0.0
|
|
10
10
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
11
11
|
|
|
12
12
|
Do not edit the class manually.
|
|
@@ -14,13 +14,24 @@
|
|
|
14
14
|
|
|
15
15
|
# import models into model package
|
|
16
16
|
from arize._generated.api_client.models.dataset import Dataset
|
|
17
|
+
from arize._generated.api_client.models.dataset_example import DatasetExample
|
|
18
|
+
from arize._generated.api_client.models.dataset_example_update import DatasetExampleUpdate
|
|
17
19
|
from arize._generated.api_client.models.dataset_version import DatasetVersion
|
|
18
20
|
from arize._generated.api_client.models.datasets_create_request import DatasetsCreateRequest
|
|
21
|
+
from arize._generated.api_client.models.datasets_examples_insert_request import DatasetsExamplesInsertRequest
|
|
22
|
+
from arize._generated.api_client.models.datasets_examples_list200_response import DatasetsExamplesList200Response
|
|
23
|
+
from arize._generated.api_client.models.datasets_examples_update_request import DatasetsExamplesUpdateRequest
|
|
19
24
|
from arize._generated.api_client.models.datasets_list200_response import DatasetsList200Response
|
|
20
|
-
from arize._generated.api_client.models.datasets_list_examples200_response import DatasetsListExamples200Response
|
|
21
|
-
from arize._generated.api_client.models.error import Error
|
|
22
25
|
from arize._generated.api_client.models.experiment import Experiment
|
|
26
|
+
from arize._generated.api_client.models.experiment_run import ExperimentRun
|
|
27
|
+
from arize._generated.api_client.models.experiment_run_create import ExperimentRunCreate
|
|
23
28
|
from arize._generated.api_client.models.experiments_create_request import ExperimentsCreateRequest
|
|
24
29
|
from arize._generated.api_client.models.experiments_list200_response import ExperimentsList200Response
|
|
25
30
|
from arize._generated.api_client.models.experiments_runs_list200_response import ExperimentsRunsList200Response
|
|
31
|
+
from arize._generated.api_client.models.pagination_metadata import PaginationMetadata
|
|
32
|
+
from arize._generated.api_client.models.primitive_value import PrimitiveValue
|
|
33
|
+
from arize._generated.api_client.models.problem import Problem
|
|
34
|
+
from arize._generated.api_client.models.project import Project
|
|
35
|
+
from arize._generated.api_client.models.projects_create_request import ProjectsCreateRequest
|
|
36
|
+
from arize._generated.api_client.models.projects_list200_response import ProjectsList200Response
|
|
26
37
|
|
|
@@ -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.
|
|
@@ -26,15 +26,15 @@ from typing_extensions import Self
|
|
|
26
26
|
|
|
27
27
|
class Dataset(BaseModel):
|
|
28
28
|
"""
|
|
29
|
-
A dataset
|
|
29
|
+
A dataset is a structured collection of examples used to test and evaluate LLM applications. Datasets allow you to test models consistently across any real-world scenarios and edge cases, quickly identify regressions, and track measurable improvements.
|
|
30
30
|
""" # noqa: E501
|
|
31
31
|
id: StrictStr = Field(description="Unique identifier for the dataset")
|
|
32
32
|
name: StrictStr = Field(description="Name of the dataset")
|
|
33
|
-
space_id: StrictStr = Field(description="Unique identifier for the space this dataset belongs to"
|
|
34
|
-
created_at:
|
|
35
|
-
updated_at:
|
|
33
|
+
space_id: StrictStr = Field(description="Unique identifier for the space this dataset belongs to")
|
|
34
|
+
created_at: datetime = Field(description="Timestamp for when the dataset was created")
|
|
35
|
+
updated_at: datetime = Field(description="Timestamp for the last update of the dataset")
|
|
36
36
|
versions: Optional[List[DatasetVersion]] = Field(default=None, description="List of versions associated with this dataset")
|
|
37
|
-
__properties: ClassVar[List[str]] = ["id", "name", "
|
|
37
|
+
__properties: ClassVar[List[str]] = ["id", "name", "space_id", "created_at", "updated_at", "versions"]
|
|
38
38
|
|
|
39
39
|
model_config = ConfigDict(
|
|
40
40
|
populate_by_name=True,
|
|
@@ -101,9 +101,9 @@ class Dataset(BaseModel):
|
|
|
101
101
|
_obj = cls.model_validate({
|
|
102
102
|
"id": obj.get("id"),
|
|
103
103
|
"name": obj.get("name"),
|
|
104
|
-
"
|
|
105
|
-
"
|
|
106
|
-
"
|
|
104
|
+
"space_id": obj.get("space_id"),
|
|
105
|
+
"created_at": obj.get("created_at"),
|
|
106
|
+
"updated_at": obj.get("updated_at"),
|
|
107
107
|
"versions": [DatasetVersion.from_dict(_item) for _item in obj["versions"]] if obj.get("versions") is not None else None
|
|
108
108
|
})
|
|
109
109
|
return _obj
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Arize REST API
|
|
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.
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 2.0.0
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
|
+
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
""" # noqa: E501
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
from __future__ import annotations
|
|
16
|
+
import pprint
|
|
17
|
+
import re # noqa: F401
|
|
18
|
+
import json
|
|
19
|
+
|
|
20
|
+
from datetime import datetime
|
|
21
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictStr
|
|
22
|
+
from typing import Any, ClassVar, Dict, List
|
|
23
|
+
from typing import Optional, Set
|
|
24
|
+
from typing_extensions import Self
|
|
25
|
+
|
|
26
|
+
class DatasetExample(BaseModel):
|
|
27
|
+
"""
|
|
28
|
+
A dataset example with arbitrary user-defined fields. System-managed fields are included as read-only for responses.
|
|
29
|
+
""" # noqa: E501
|
|
30
|
+
id: StrictStr = Field(description="System-assigned unique ID for the example")
|
|
31
|
+
created_at: datetime = Field(description="Timestamp for when the example was created")
|
|
32
|
+
updated_at: datetime = Field(description="Timestamp for the last update of the example")
|
|
33
|
+
additional_properties: Dict[str, Any] = {}
|
|
34
|
+
__properties: ClassVar[List[str]] = ["id", "created_at", "updated_at"]
|
|
35
|
+
|
|
36
|
+
model_config = ConfigDict(
|
|
37
|
+
populate_by_name=True,
|
|
38
|
+
validate_assignment=True,
|
|
39
|
+
protected_namespaces=(),
|
|
40
|
+
)
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
def to_str(self) -> str:
|
|
44
|
+
"""Returns the string representation of the model using alias"""
|
|
45
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
46
|
+
|
|
47
|
+
def to_json(self) -> str:
|
|
48
|
+
"""Returns the JSON representation of the model using alias"""
|
|
49
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
50
|
+
return json.dumps(self.to_dict())
|
|
51
|
+
|
|
52
|
+
@classmethod
|
|
53
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
54
|
+
"""Create an instance of DatasetExample from a JSON string"""
|
|
55
|
+
return cls.from_dict(json.loads(json_str))
|
|
56
|
+
|
|
57
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
58
|
+
"""Return the dictionary representation of the model using alias.
|
|
59
|
+
|
|
60
|
+
This has the following differences from calling pydantic's
|
|
61
|
+
`self.model_dump(by_alias=True)`:
|
|
62
|
+
|
|
63
|
+
* `None` is only added to the output dict for nullable fields that
|
|
64
|
+
were set at model initialization. Other fields with value `None`
|
|
65
|
+
are ignored.
|
|
66
|
+
* OpenAPI `readOnly` fields are excluded.
|
|
67
|
+
* OpenAPI `readOnly` fields are excluded.
|
|
68
|
+
* OpenAPI `readOnly` fields are excluded.
|
|
69
|
+
* Fields in `self.additional_properties` are added to the output dict.
|
|
70
|
+
"""
|
|
71
|
+
excluded_fields: Set[str] = set([
|
|
72
|
+
"id",
|
|
73
|
+
"created_at",
|
|
74
|
+
"updated_at",
|
|
75
|
+
"additional_properties",
|
|
76
|
+
])
|
|
77
|
+
|
|
78
|
+
_dict = self.model_dump(
|
|
79
|
+
by_alias=True,
|
|
80
|
+
exclude=excluded_fields,
|
|
81
|
+
exclude_none=True,
|
|
82
|
+
)
|
|
83
|
+
# puts key-value pairs in additional_properties in the top level
|
|
84
|
+
if self.additional_properties is not None:
|
|
85
|
+
for _key, _value in self.additional_properties.items():
|
|
86
|
+
_dict[_key] = _value
|
|
87
|
+
|
|
88
|
+
return _dict
|
|
89
|
+
|
|
90
|
+
@classmethod
|
|
91
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
92
|
+
"""Create an instance of DatasetExample from a dict"""
|
|
93
|
+
if obj is None:
|
|
94
|
+
return None
|
|
95
|
+
|
|
96
|
+
if not isinstance(obj, dict):
|
|
97
|
+
return cls.model_validate(obj)
|
|
98
|
+
|
|
99
|
+
_obj = cls.model_validate({
|
|
100
|
+
"id": obj.get("id"),
|
|
101
|
+
"created_at": obj.get("created_at"),
|
|
102
|
+
"updated_at": obj.get("updated_at")
|
|
103
|
+
})
|
|
104
|
+
# store additional fields in additional_properties
|
|
105
|
+
for _key in obj.keys():
|
|
106
|
+
if _key not in cls.__properties:
|
|
107
|
+
_obj.additional_properties[_key] = obj.get(_key)
|
|
108
|
+
|
|
109
|
+
return _obj
|
|
110
|
+
|
|
111
|
+
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Arize REST API
|
|
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.
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 2.0.0
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
|
+
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
""" # noqa: E501
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
from __future__ import annotations
|
|
16
|
+
import pprint
|
|
17
|
+
import re # noqa: F401
|
|
18
|
+
import json
|
|
19
|
+
|
|
20
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictStr
|
|
21
|
+
from typing import Any, ClassVar, Dict, List
|
|
22
|
+
from typing import Optional, Set
|
|
23
|
+
from typing_extensions import Self
|
|
24
|
+
|
|
25
|
+
class DatasetExampleUpdate(BaseModel):
|
|
26
|
+
"""
|
|
27
|
+
A dataset example with arbitrary user-defined fields. System-managed fields, except 'id', are excluded for update requests.
|
|
28
|
+
""" # noqa: E501
|
|
29
|
+
id: StrictStr = Field(description="System-assigned unique ID for the example")
|
|
30
|
+
additional_properties: Dict[str, Any] = {}
|
|
31
|
+
__properties: ClassVar[List[str]] = ["id"]
|
|
32
|
+
|
|
33
|
+
model_config = ConfigDict(
|
|
34
|
+
populate_by_name=True,
|
|
35
|
+
validate_assignment=True,
|
|
36
|
+
protected_namespaces=(),
|
|
37
|
+
)
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
def to_str(self) -> str:
|
|
41
|
+
"""Returns the string representation of the model using alias"""
|
|
42
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
43
|
+
|
|
44
|
+
def to_json(self) -> str:
|
|
45
|
+
"""Returns the JSON representation of the model using alias"""
|
|
46
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
47
|
+
return json.dumps(self.to_dict())
|
|
48
|
+
|
|
49
|
+
@classmethod
|
|
50
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
51
|
+
"""Create an instance of DatasetExampleUpdate from a JSON string"""
|
|
52
|
+
return cls.from_dict(json.loads(json_str))
|
|
53
|
+
|
|
54
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
55
|
+
"""Return the dictionary representation of the model using alias.
|
|
56
|
+
|
|
57
|
+
This has the following differences from calling pydantic's
|
|
58
|
+
`self.model_dump(by_alias=True)`:
|
|
59
|
+
|
|
60
|
+
* `None` is only added to the output dict for nullable fields that
|
|
61
|
+
were set at model initialization. Other fields with value `None`
|
|
62
|
+
are ignored.
|
|
63
|
+
* Fields in `self.additional_properties` are added to the output dict.
|
|
64
|
+
"""
|
|
65
|
+
excluded_fields: Set[str] = set([
|
|
66
|
+
"additional_properties",
|
|
67
|
+
])
|
|
68
|
+
|
|
69
|
+
_dict = self.model_dump(
|
|
70
|
+
by_alias=True,
|
|
71
|
+
exclude=excluded_fields,
|
|
72
|
+
exclude_none=True,
|
|
73
|
+
)
|
|
74
|
+
# puts key-value pairs in additional_properties in the top level
|
|
75
|
+
if self.additional_properties is not None:
|
|
76
|
+
for _key, _value in self.additional_properties.items():
|
|
77
|
+
_dict[_key] = _value
|
|
78
|
+
|
|
79
|
+
return _dict
|
|
80
|
+
|
|
81
|
+
@classmethod
|
|
82
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
83
|
+
"""Create an instance of DatasetExampleUpdate from a dict"""
|
|
84
|
+
if obj is None:
|
|
85
|
+
return None
|
|
86
|
+
|
|
87
|
+
if not isinstance(obj, dict):
|
|
88
|
+
return cls.model_validate(obj)
|
|
89
|
+
|
|
90
|
+
_obj = cls.model_validate({
|
|
91
|
+
"id": obj.get("id")
|
|
92
|
+
})
|
|
93
|
+
# store additional fields in additional_properties
|
|
94
|
+
for _key in obj.keys():
|
|
95
|
+
if _key not in cls.__properties:
|
|
96
|
+
_obj.additional_properties[_key] = obj.get(_key)
|
|
97
|
+
|
|
98
|
+
return _obj
|
|
99
|
+
|
|
100
|
+
|
|
@@ -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.
|
|
@@ -19,20 +19,20 @@ import json
|
|
|
19
19
|
|
|
20
20
|
from datetime import datetime
|
|
21
21
|
from pydantic import BaseModel, ConfigDict, Field, StrictStr
|
|
22
|
-
from typing import Any, ClassVar, Dict, List
|
|
22
|
+
from typing import Any, ClassVar, Dict, List
|
|
23
23
|
from typing import Optional, Set
|
|
24
24
|
from typing_extensions import Self
|
|
25
25
|
|
|
26
26
|
class DatasetVersion(BaseModel):
|
|
27
27
|
"""
|
|
28
|
-
|
|
28
|
+
A dataset version is a saved snapshot of a dataset. Arize stores datasets as version-controlled collections of examples for experiments. When you update a dataset, you can do so inplace or create a new version while preserving access to previous versions.
|
|
29
29
|
""" # noqa: E501
|
|
30
|
-
id:
|
|
31
|
-
name:
|
|
32
|
-
dataset_id:
|
|
33
|
-
created_at:
|
|
34
|
-
updated_at:
|
|
35
|
-
__properties: ClassVar[List[str]] = ["id", "name", "
|
|
30
|
+
id: StrictStr = Field(description="Unique identifier for the dataset version")
|
|
31
|
+
name: StrictStr = Field(description="Name of the dataset version")
|
|
32
|
+
dataset_id: StrictStr = Field(description="Unique identifier for the dataset this version belongs to")
|
|
33
|
+
created_at: datetime = Field(description="Timestamp for when the dataset version was created")
|
|
34
|
+
updated_at: datetime = Field(description="Timestamp for the last update of the dataset version")
|
|
35
|
+
__properties: ClassVar[List[str]] = ["id", "name", "dataset_id", "created_at", "updated_at"]
|
|
36
36
|
|
|
37
37
|
model_config = ConfigDict(
|
|
38
38
|
populate_by_name=True,
|
|
@@ -92,9 +92,9 @@ class DatasetVersion(BaseModel):
|
|
|
92
92
|
_obj = cls.model_validate({
|
|
93
93
|
"id": obj.get("id"),
|
|
94
94
|
"name": obj.get("name"),
|
|
95
|
-
"
|
|
96
|
-
"
|
|
97
|
-
"
|
|
95
|
+
"dataset_id": obj.get("dataset_id"),
|
|
96
|
+
"created_at": obj.get("created_at"),
|
|
97
|
+
"updated_at": obj.get("updated_at")
|
|
98
98
|
})
|
|
99
99
|
return _obj
|
|
100
100
|
|
|
@@ -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.
|
|
@@ -19,6 +19,7 @@ import json
|
|
|
19
19
|
|
|
20
20
|
from pydantic import BaseModel, ConfigDict, Field, StrictStr
|
|
21
21
|
from typing import Any, ClassVar, Dict, List
|
|
22
|
+
from arize._generated.api_client.models.primitive_value import PrimitiveValue
|
|
22
23
|
from typing import Optional, Set
|
|
23
24
|
from typing_extensions import Self
|
|
24
25
|
|
|
@@ -26,10 +27,10 @@ class DatasetsCreateRequest(BaseModel):
|
|
|
26
27
|
"""
|
|
27
28
|
DatasetsCreateRequest
|
|
28
29
|
""" # noqa: E501
|
|
29
|
-
name: StrictStr
|
|
30
|
-
space_id: StrictStr = Field(
|
|
31
|
-
examples: List[Dict[str,
|
|
32
|
-
__properties: ClassVar[List[str]] = ["name", "
|
|
30
|
+
name: StrictStr = Field(description="Name of the new dataset")
|
|
31
|
+
space_id: StrictStr = Field(description="ID of the space the dataset will belong to")
|
|
32
|
+
examples: List[Dict[str, PrimitiveValue]] = Field(description="Array of examples for the new dataset")
|
|
33
|
+
__properties: ClassVar[List[str]] = ["name", "space_id", "examples"]
|
|
33
34
|
|
|
34
35
|
model_config = ConfigDict(
|
|
35
36
|
populate_by_name=True,
|
|
@@ -70,6 +71,13 @@ class DatasetsCreateRequest(BaseModel):
|
|
|
70
71
|
exclude=excluded_fields,
|
|
71
72
|
exclude_none=True,
|
|
72
73
|
)
|
|
74
|
+
# override the default output from pydantic by calling `to_dict()` of each item in examples (list)
|
|
75
|
+
_items = []
|
|
76
|
+
if self.examples:
|
|
77
|
+
for _item_examples in self.examples:
|
|
78
|
+
if _item_examples:
|
|
79
|
+
_items.append(_item_examples.to_dict())
|
|
80
|
+
_dict['examples'] = _items
|
|
73
81
|
return _dict
|
|
74
82
|
|
|
75
83
|
@classmethod
|
|
@@ -88,8 +96,8 @@ class DatasetsCreateRequest(BaseModel):
|
|
|
88
96
|
|
|
89
97
|
_obj = cls.model_validate({
|
|
90
98
|
"name": obj.get("name"),
|
|
91
|
-
"
|
|
92
|
-
"examples": obj.get("examples")
|
|
99
|
+
"space_id": obj.get("space_id"),
|
|
100
|
+
"examples": [Dict[str, PrimitiveValue].from_dict(_item) for _item in obj["examples"]] if obj.get("examples") is not None else None
|
|
93
101
|
})
|
|
94
102
|
return _obj
|
|
95
103
|
|