arize 8.0.0a21__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 +208 -77
- 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 +269 -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 +390 -286
- 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.0a21.dist-info → arize-8.0.0a23.dist-info}/METADATA +4 -3
- arize-8.0.0a23.dist-info/RECORD +174 -0
- {arize-8.0.0a21.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.0a21.dist-info/RECORD +0 -146
- arize-8.0.0a21.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.
|
|
@@ -18,7 +18,8 @@ import re # noqa: F401
|
|
|
18
18
|
import json
|
|
19
19
|
|
|
20
20
|
from pydantic import BaseModel, ConfigDict, Field, StrictStr
|
|
21
|
-
from typing import Any, ClassVar, Dict, List
|
|
21
|
+
from typing import Any, ClassVar, Dict, List
|
|
22
|
+
from arize._generated.api_client.models.experiment_run_create import ExperimentRunCreate
|
|
22
23
|
from typing import Optional, Set
|
|
23
24
|
from typing_extensions import Self
|
|
24
25
|
|
|
@@ -27,10 +28,9 @@ class ExperimentsCreateRequest(BaseModel):
|
|
|
27
28
|
ExperimentsCreateRequest
|
|
28
29
|
""" # noqa: E501
|
|
29
30
|
name: StrictStr = Field(description="Name of the experiment")
|
|
30
|
-
dataset_id: StrictStr = Field(description="ID of the dataset to create the experiment for"
|
|
31
|
-
experiment_runs: List[
|
|
32
|
-
|
|
33
|
-
__properties: ClassVar[List[str]] = ["name", "datasetId", "experimentRuns", "datasetVersionId"]
|
|
31
|
+
dataset_id: StrictStr = Field(description="ID of the dataset to create the experiment for")
|
|
32
|
+
experiment_runs: List[ExperimentRunCreate] = Field(description="Array of experiment run data")
|
|
33
|
+
__properties: ClassVar[List[str]] = ["name", "dataset_id", "experiment_runs"]
|
|
34
34
|
|
|
35
35
|
model_config = ConfigDict(
|
|
36
36
|
populate_by_name=True,
|
|
@@ -71,6 +71,13 @@ class ExperimentsCreateRequest(BaseModel):
|
|
|
71
71
|
exclude=excluded_fields,
|
|
72
72
|
exclude_none=True,
|
|
73
73
|
)
|
|
74
|
+
# override the default output from pydantic by calling `to_dict()` of each item in experiment_runs (list)
|
|
75
|
+
_items = []
|
|
76
|
+
if self.experiment_runs:
|
|
77
|
+
for _item_experiment_runs in self.experiment_runs:
|
|
78
|
+
if _item_experiment_runs:
|
|
79
|
+
_items.append(_item_experiment_runs.to_dict())
|
|
80
|
+
_dict['experiment_runs'] = _items
|
|
74
81
|
return _dict
|
|
75
82
|
|
|
76
83
|
@classmethod
|
|
@@ -89,9 +96,8 @@ class ExperimentsCreateRequest(BaseModel):
|
|
|
89
96
|
|
|
90
97
|
_obj = cls.model_validate({
|
|
91
98
|
"name": obj.get("name"),
|
|
92
|
-
"
|
|
93
|
-
"
|
|
94
|
-
"datasetVersionId": obj.get("datasetVersionId")
|
|
99
|
+
"dataset_id": obj.get("dataset_id"),
|
|
100
|
+
"experiment_runs": [ExperimentRunCreate.from_dict(_item) for _item in obj["experiment_runs"]] if obj.get("experiment_runs") is not None else None
|
|
95
101
|
})
|
|
96
102
|
return _obj
|
|
97
103
|
|
|
@@ -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.
|
|
@@ -20,6 +20,7 @@ import json
|
|
|
20
20
|
from pydantic import BaseModel, ConfigDict, Field
|
|
21
21
|
from typing import Any, ClassVar, Dict, List
|
|
22
22
|
from arize._generated.api_client.models.experiment import Experiment
|
|
23
|
+
from arize._generated.api_client.models.pagination_metadata import PaginationMetadata
|
|
23
24
|
from typing import Optional, Set
|
|
24
25
|
from typing_extensions import Self
|
|
25
26
|
|
|
@@ -28,7 +29,8 @@ class ExperimentsList200Response(BaseModel):
|
|
|
28
29
|
ExperimentsList200Response
|
|
29
30
|
""" # noqa: E501
|
|
30
31
|
experiments: List[Experiment] = Field(description="A list of experiments")
|
|
31
|
-
|
|
32
|
+
pagination: PaginationMetadata
|
|
33
|
+
__properties: ClassVar[List[str]] = ["experiments", "pagination"]
|
|
32
34
|
|
|
33
35
|
model_config = ConfigDict(
|
|
34
36
|
populate_by_name=True,
|
|
@@ -76,6 +78,9 @@ class ExperimentsList200Response(BaseModel):
|
|
|
76
78
|
if _item_experiments:
|
|
77
79
|
_items.append(_item_experiments.to_dict())
|
|
78
80
|
_dict['experiments'] = _items
|
|
81
|
+
# override the default output from pydantic by calling `to_dict()` of pagination
|
|
82
|
+
if self.pagination:
|
|
83
|
+
_dict['pagination'] = self.pagination.to_dict()
|
|
79
84
|
return _dict
|
|
80
85
|
|
|
81
86
|
@classmethod
|
|
@@ -93,7 +98,8 @@ class ExperimentsList200Response(BaseModel):
|
|
|
93
98
|
raise ValueError("Error due to additional fields (not defined in ExperimentsList200Response) in the input: " + _key)
|
|
94
99
|
|
|
95
100
|
_obj = cls.model_validate({
|
|
96
|
-
"experiments": [Experiment.from_dict(_item) for _item in obj["experiments"]] if obj.get("experiments") is not None else None
|
|
101
|
+
"experiments": [Experiment.from_dict(_item) for _item in obj["experiments"]] if obj.get("experiments") is not None else None,
|
|
102
|
+
"pagination": PaginationMetadata.from_dict(obj["pagination"]) if obj.get("pagination") is not None else None
|
|
97
103
|
})
|
|
98
104
|
return _obj
|
|
99
105
|
|
|
@@ -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,8 @@ import json
|
|
|
19
19
|
|
|
20
20
|
from pydantic import BaseModel, ConfigDict, Field
|
|
21
21
|
from typing import Any, ClassVar, Dict, List
|
|
22
|
+
from arize._generated.api_client.models.experiment_run import ExperimentRun
|
|
23
|
+
from arize._generated.api_client.models.pagination_metadata import PaginationMetadata
|
|
22
24
|
from typing import Optional, Set
|
|
23
25
|
from typing_extensions import Self
|
|
24
26
|
|
|
@@ -26,8 +28,9 @@ class ExperimentsRunsList200Response(BaseModel):
|
|
|
26
28
|
"""
|
|
27
29
|
ExperimentsRunsList200Response
|
|
28
30
|
""" # noqa: E501
|
|
29
|
-
experiment_runs: List[
|
|
30
|
-
|
|
31
|
+
experiment_runs: List[ExperimentRun] = Field(description="Array of experiment run objects containing experiment fields and evaluations")
|
|
32
|
+
pagination: PaginationMetadata
|
|
33
|
+
__properties: ClassVar[List[str]] = ["experiment_runs", "pagination"]
|
|
31
34
|
|
|
32
35
|
model_config = ConfigDict(
|
|
33
36
|
populate_by_name=True,
|
|
@@ -68,6 +71,16 @@ class ExperimentsRunsList200Response(BaseModel):
|
|
|
68
71
|
exclude=excluded_fields,
|
|
69
72
|
exclude_none=True,
|
|
70
73
|
)
|
|
74
|
+
# override the default output from pydantic by calling `to_dict()` of each item in experiment_runs (list)
|
|
75
|
+
_items = []
|
|
76
|
+
if self.experiment_runs:
|
|
77
|
+
for _item_experiment_runs in self.experiment_runs:
|
|
78
|
+
if _item_experiment_runs:
|
|
79
|
+
_items.append(_item_experiment_runs.to_dict())
|
|
80
|
+
_dict['experiment_runs'] = _items
|
|
81
|
+
# override the default output from pydantic by calling `to_dict()` of pagination
|
|
82
|
+
if self.pagination:
|
|
83
|
+
_dict['pagination'] = self.pagination.to_dict()
|
|
71
84
|
return _dict
|
|
72
85
|
|
|
73
86
|
@classmethod
|
|
@@ -85,7 +98,8 @@ class ExperimentsRunsList200Response(BaseModel):
|
|
|
85
98
|
raise ValueError("Error due to additional fields (not defined in ExperimentsRunsList200Response) in the input: " + _key)
|
|
86
99
|
|
|
87
100
|
_obj = cls.model_validate({
|
|
88
|
-
"
|
|
101
|
+
"experiment_runs": [ExperimentRun.from_dict(_item) for _item in obj["experiment_runs"]] if obj.get("experiment_runs") is not None else None,
|
|
102
|
+
"pagination": PaginationMetadata.from_dict(obj["pagination"]) if obj.get("pagination") is not None else None
|
|
89
103
|
})
|
|
90
104
|
return _obj
|
|
91
105
|
|
|
@@ -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.
|
|
@@ -17,17 +17,18 @@ import pprint
|
|
|
17
17
|
import re # noqa: F401
|
|
18
18
|
import json
|
|
19
19
|
|
|
20
|
-
from pydantic import BaseModel, ConfigDict, StrictStr
|
|
20
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr
|
|
21
21
|
from typing import Any, ClassVar, Dict, List, Optional
|
|
22
22
|
from typing import Optional, Set
|
|
23
23
|
from typing_extensions import Self
|
|
24
24
|
|
|
25
|
-
class
|
|
25
|
+
class PaginationMetadata(BaseModel):
|
|
26
26
|
"""
|
|
27
|
-
|
|
27
|
+
Cursor-based pagination metadata. Use `next_cursor` in the subsequent request's `cursor` query parameter.
|
|
28
28
|
""" # noqa: E501
|
|
29
|
-
|
|
30
|
-
|
|
29
|
+
next_cursor: Optional[StrictStr] = Field(default=None, description="Opaque cursor for fetching the next page. Treat as an unreadable token. Present when `has_more` is true; omitted when `hasMore` is false. ")
|
|
30
|
+
has_more: StrictBool = Field(description="True if another page of results is available.")
|
|
31
|
+
__properties: ClassVar[List[str]] = ["next_cursor", "has_more"]
|
|
31
32
|
|
|
32
33
|
model_config = ConfigDict(
|
|
33
34
|
populate_by_name=True,
|
|
@@ -47,7 +48,7 @@ class Error(BaseModel):
|
|
|
47
48
|
|
|
48
49
|
@classmethod
|
|
49
50
|
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
50
|
-
"""Create an instance of
|
|
51
|
+
"""Create an instance of PaginationMetadata from a JSON string"""
|
|
51
52
|
return cls.from_dict(json.loads(json_str))
|
|
52
53
|
|
|
53
54
|
def to_dict(self) -> Dict[str, Any]:
|
|
@@ -72,7 +73,7 @@ class Error(BaseModel):
|
|
|
72
73
|
|
|
73
74
|
@classmethod
|
|
74
75
|
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
75
|
-
"""Create an instance of
|
|
76
|
+
"""Create an instance of PaginationMetadata from a dict"""
|
|
76
77
|
if obj is None:
|
|
77
78
|
return None
|
|
78
79
|
|
|
@@ -82,10 +83,11 @@ class Error(BaseModel):
|
|
|
82
83
|
# raise errors for additional fields in the input
|
|
83
84
|
for _key in obj.keys():
|
|
84
85
|
if _key not in cls.__properties:
|
|
85
|
-
raise ValueError("Error due to additional fields (not defined in
|
|
86
|
+
raise ValueError("Error due to additional fields (not defined in PaginationMetadata) in the input: " + _key)
|
|
86
87
|
|
|
87
88
|
_obj = cls.model_validate({
|
|
88
|
-
"
|
|
89
|
+
"next_cursor": obj.get("next_cursor"),
|
|
90
|
+
"has_more": obj.get("has_more")
|
|
89
91
|
})
|
|
90
92
|
return _obj
|
|
91
93
|
|
|
@@ -0,0 +1,172 @@
|
|
|
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
|
+
from inspect import getfullargspec
|
|
17
|
+
import json
|
|
18
|
+
import pprint
|
|
19
|
+
import re # noqa: F401
|
|
20
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt, StrictStr, ValidationError, field_validator
|
|
21
|
+
from typing import Optional, Union
|
|
22
|
+
from typing import Union, Any, List, Set, TYPE_CHECKING, Optional, Dict
|
|
23
|
+
from typing_extensions import Literal, Self
|
|
24
|
+
from pydantic import Field
|
|
25
|
+
|
|
26
|
+
PRIMITIVEVALUE_ANY_OF_SCHEMAS = ["bool", "float", "int", "str"]
|
|
27
|
+
|
|
28
|
+
class PrimitiveValue(BaseModel):
|
|
29
|
+
"""
|
|
30
|
+
A JSON primitive value (string, number, integer, or boolean)
|
|
31
|
+
"""
|
|
32
|
+
|
|
33
|
+
# data type: int
|
|
34
|
+
anyof_schema_1_validator: Optional[StrictInt] = None
|
|
35
|
+
# data type: float
|
|
36
|
+
anyof_schema_2_validator: Optional[Union[StrictFloat, StrictInt]] = None
|
|
37
|
+
# data type: str
|
|
38
|
+
anyof_schema_3_validator: Optional[StrictStr] = None
|
|
39
|
+
# data type: bool
|
|
40
|
+
anyof_schema_4_validator: Optional[StrictBool] = None
|
|
41
|
+
if TYPE_CHECKING:
|
|
42
|
+
actual_instance: Optional[Union[bool, float, int, str]] = None
|
|
43
|
+
else:
|
|
44
|
+
actual_instance: Any = None
|
|
45
|
+
any_of_schemas: Set[str] = { "bool", "float", "int", "str" }
|
|
46
|
+
|
|
47
|
+
model_config = {
|
|
48
|
+
"validate_assignment": True,
|
|
49
|
+
"protected_namespaces": (),
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
def __init__(self, *args, **kwargs) -> None:
|
|
53
|
+
if args:
|
|
54
|
+
if len(args) > 1:
|
|
55
|
+
raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`")
|
|
56
|
+
if kwargs:
|
|
57
|
+
raise ValueError("If a position argument is used, keyword arguments cannot be used.")
|
|
58
|
+
super().__init__(actual_instance=args[0])
|
|
59
|
+
else:
|
|
60
|
+
super().__init__(**kwargs)
|
|
61
|
+
|
|
62
|
+
@field_validator('actual_instance')
|
|
63
|
+
def actual_instance_must_validate_anyof(cls, v):
|
|
64
|
+
instance = PrimitiveValue.model_construct()
|
|
65
|
+
error_messages = []
|
|
66
|
+
# validate data type: int
|
|
67
|
+
try:
|
|
68
|
+
instance.anyof_schema_1_validator = v
|
|
69
|
+
return v
|
|
70
|
+
except (ValidationError, ValueError) as e:
|
|
71
|
+
error_messages.append(str(e))
|
|
72
|
+
# validate data type: float
|
|
73
|
+
try:
|
|
74
|
+
instance.anyof_schema_2_validator = v
|
|
75
|
+
return v
|
|
76
|
+
except (ValidationError, ValueError) as e:
|
|
77
|
+
error_messages.append(str(e))
|
|
78
|
+
# validate data type: str
|
|
79
|
+
try:
|
|
80
|
+
instance.anyof_schema_3_validator = v
|
|
81
|
+
return v
|
|
82
|
+
except (ValidationError, ValueError) as e:
|
|
83
|
+
error_messages.append(str(e))
|
|
84
|
+
# validate data type: bool
|
|
85
|
+
try:
|
|
86
|
+
instance.anyof_schema_4_validator = v
|
|
87
|
+
return v
|
|
88
|
+
except (ValidationError, ValueError) as e:
|
|
89
|
+
error_messages.append(str(e))
|
|
90
|
+
if error_messages:
|
|
91
|
+
# no match
|
|
92
|
+
raise ValueError("No match found when setting the actual_instance in PrimitiveValue with anyOf schemas: bool, float, int, str. Details: " + ", ".join(error_messages))
|
|
93
|
+
else:
|
|
94
|
+
return v
|
|
95
|
+
|
|
96
|
+
@classmethod
|
|
97
|
+
def from_dict(cls, obj: Dict[str, Any]) -> Self:
|
|
98
|
+
return cls.from_json(json.dumps(obj))
|
|
99
|
+
|
|
100
|
+
@classmethod
|
|
101
|
+
def from_json(cls, json_str: str) -> Self:
|
|
102
|
+
"""Returns the object represented by the json string"""
|
|
103
|
+
instance = cls.model_construct()
|
|
104
|
+
error_messages = []
|
|
105
|
+
# deserialize data into int
|
|
106
|
+
try:
|
|
107
|
+
# validation
|
|
108
|
+
instance.anyof_schema_1_validator = json.loads(json_str)
|
|
109
|
+
# assign value to actual_instance
|
|
110
|
+
instance.actual_instance = instance.anyof_schema_1_validator
|
|
111
|
+
return instance
|
|
112
|
+
except (ValidationError, ValueError) as e:
|
|
113
|
+
error_messages.append(str(e))
|
|
114
|
+
# deserialize data into float
|
|
115
|
+
try:
|
|
116
|
+
# validation
|
|
117
|
+
instance.anyof_schema_2_validator = json.loads(json_str)
|
|
118
|
+
# assign value to actual_instance
|
|
119
|
+
instance.actual_instance = instance.anyof_schema_2_validator
|
|
120
|
+
return instance
|
|
121
|
+
except (ValidationError, ValueError) as e:
|
|
122
|
+
error_messages.append(str(e))
|
|
123
|
+
# deserialize data into str
|
|
124
|
+
try:
|
|
125
|
+
# validation
|
|
126
|
+
instance.anyof_schema_3_validator = json.loads(json_str)
|
|
127
|
+
# assign value to actual_instance
|
|
128
|
+
instance.actual_instance = instance.anyof_schema_3_validator
|
|
129
|
+
return instance
|
|
130
|
+
except (ValidationError, ValueError) as e:
|
|
131
|
+
error_messages.append(str(e))
|
|
132
|
+
# deserialize data into bool
|
|
133
|
+
try:
|
|
134
|
+
# validation
|
|
135
|
+
instance.anyof_schema_4_validator = json.loads(json_str)
|
|
136
|
+
# assign value to actual_instance
|
|
137
|
+
instance.actual_instance = instance.anyof_schema_4_validator
|
|
138
|
+
return instance
|
|
139
|
+
except (ValidationError, ValueError) as e:
|
|
140
|
+
error_messages.append(str(e))
|
|
141
|
+
|
|
142
|
+
if error_messages:
|
|
143
|
+
# no match
|
|
144
|
+
raise ValueError("No match found when deserializing the JSON string into PrimitiveValue with anyOf schemas: bool, float, int, str. Details: " + ", ".join(error_messages))
|
|
145
|
+
else:
|
|
146
|
+
return instance
|
|
147
|
+
|
|
148
|
+
def to_json(self) -> str:
|
|
149
|
+
"""Returns the JSON representation of the actual instance"""
|
|
150
|
+
if self.actual_instance is None:
|
|
151
|
+
return "null"
|
|
152
|
+
|
|
153
|
+
if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json):
|
|
154
|
+
return self.actual_instance.to_json()
|
|
155
|
+
else:
|
|
156
|
+
return json.dumps(self.actual_instance)
|
|
157
|
+
|
|
158
|
+
def to_dict(self) -> Optional[Union[Dict[str, Any], bool, float, int, str]]:
|
|
159
|
+
"""Returns the dict representation of the actual instance"""
|
|
160
|
+
if self.actual_instance is None:
|
|
161
|
+
return None
|
|
162
|
+
|
|
163
|
+
if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict):
|
|
164
|
+
return self.actual_instance.to_dict()
|
|
165
|
+
else:
|
|
166
|
+
return self.actual_instance
|
|
167
|
+
|
|
168
|
+
def to_str(self) -> str:
|
|
169
|
+
"""Returns the string representation of the actual instance"""
|
|
170
|
+
return pprint.pformat(self.model_dump())
|
|
171
|
+
|
|
172
|
+
|
|
@@ -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, StrictInt, StrictStr
|
|
21
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
22
|
+
from typing import Optional, Set
|
|
23
|
+
from typing_extensions import Self
|
|
24
|
+
|
|
25
|
+
class Problem(BaseModel):
|
|
26
|
+
"""
|
|
27
|
+
RFC 9457 Problem Details
|
|
28
|
+
""" # noqa: E501
|
|
29
|
+
title: StrictStr = Field(description="A short, human-readable summary of the problem type")
|
|
30
|
+
status: StrictInt = Field(description="The HTTP status code generated by the origin server for this occurrence of the problem")
|
|
31
|
+
type: Optional[StrictStr] = Field(default=None, description="A URI reference that identifies the problem type")
|
|
32
|
+
detail: Optional[StrictStr] = Field(default=None, description="A human-readable explanation specific to this occurrence of the problem")
|
|
33
|
+
instance: Optional[StrictStr] = Field(default=None, description="A URI reference that identifies the specific occurrence of the problem")
|
|
34
|
+
__properties: ClassVar[List[str]] = ["title", "status", "type", "detail", "instance"]
|
|
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 Problem 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
|
+
"""
|
|
67
|
+
excluded_fields: Set[str] = set([
|
|
68
|
+
])
|
|
69
|
+
|
|
70
|
+
_dict = self.model_dump(
|
|
71
|
+
by_alias=True,
|
|
72
|
+
exclude=excluded_fields,
|
|
73
|
+
exclude_none=True,
|
|
74
|
+
)
|
|
75
|
+
return _dict
|
|
76
|
+
|
|
77
|
+
@classmethod
|
|
78
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
79
|
+
"""Create an instance of Problem from a dict"""
|
|
80
|
+
if obj is None:
|
|
81
|
+
return None
|
|
82
|
+
|
|
83
|
+
if not isinstance(obj, dict):
|
|
84
|
+
return cls.model_validate(obj)
|
|
85
|
+
|
|
86
|
+
# raise errors for additional fields in the input
|
|
87
|
+
for _key in obj.keys():
|
|
88
|
+
if _key not in cls.__properties:
|
|
89
|
+
raise ValueError("Error due to additional fields (not defined in Problem) in the input: " + _key)
|
|
90
|
+
|
|
91
|
+
_obj = cls.model_validate({
|
|
92
|
+
"title": obj.get("title"),
|
|
93
|
+
"status": obj.get("status"),
|
|
94
|
+
"type": obj.get("type"),
|
|
95
|
+
"detail": obj.get("detail"),
|
|
96
|
+
"instance": obj.get("instance")
|
|
97
|
+
})
|
|
98
|
+
return _obj
|
|
99
|
+
|
|
100
|
+
|
|
@@ -0,0 +1,99 @@
|
|
|
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 Project(BaseModel):
|
|
27
|
+
"""
|
|
28
|
+
A project represents an LLM application and serves as the primary container for observability data. Each project collects traces and spans that capture the execution flow of your application, enabling you to debug issues, monitor latency, and analyze token usage. Projects belong to a space and provide a centralized view of your application's performance. Use projects to organize related traces, run experiments against datasets, and track improvements over time.
|
|
29
|
+
""" # noqa: E501
|
|
30
|
+
id: StrictStr = Field(description="The project ID")
|
|
31
|
+
name: StrictStr = Field(description="The project name")
|
|
32
|
+
space_id: StrictStr = Field(description="The space ID the project belongs to")
|
|
33
|
+
created_at: datetime = Field(description="When the project was created")
|
|
34
|
+
__properties: ClassVar[List[str]] = ["id", "name", "space_id", "created_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 Project 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
|
+
"""
|
|
67
|
+
excluded_fields: Set[str] = set([
|
|
68
|
+
])
|
|
69
|
+
|
|
70
|
+
_dict = self.model_dump(
|
|
71
|
+
by_alias=True,
|
|
72
|
+
exclude=excluded_fields,
|
|
73
|
+
exclude_none=True,
|
|
74
|
+
)
|
|
75
|
+
return _dict
|
|
76
|
+
|
|
77
|
+
@classmethod
|
|
78
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
79
|
+
"""Create an instance of Project from a dict"""
|
|
80
|
+
if obj is None:
|
|
81
|
+
return None
|
|
82
|
+
|
|
83
|
+
if not isinstance(obj, dict):
|
|
84
|
+
return cls.model_validate(obj)
|
|
85
|
+
|
|
86
|
+
# raise errors for additional fields in the input
|
|
87
|
+
for _key in obj.keys():
|
|
88
|
+
if _key not in cls.__properties:
|
|
89
|
+
raise ValueError("Error due to additional fields (not defined in Project) in the input: " + _key)
|
|
90
|
+
|
|
91
|
+
_obj = cls.model_validate({
|
|
92
|
+
"id": obj.get("id"),
|
|
93
|
+
"name": obj.get("name"),
|
|
94
|
+
"space_id": obj.get("space_id"),
|
|
95
|
+
"created_at": obj.get("created_at")
|
|
96
|
+
})
|
|
97
|
+
return _obj
|
|
98
|
+
|
|
99
|
+
|
|
@@ -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.
|
|
@@ -17,17 +17,18 @@ import pprint
|
|
|
17
17
|
import re # noqa: F401
|
|
18
18
|
import json
|
|
19
19
|
|
|
20
|
-
from pydantic import BaseModel, ConfigDict, Field
|
|
20
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictStr
|
|
21
21
|
from typing import Any, ClassVar, Dict, List
|
|
22
22
|
from typing import Optional, Set
|
|
23
23
|
from typing_extensions import Self
|
|
24
24
|
|
|
25
|
-
class
|
|
25
|
+
class ProjectsCreateRequest(BaseModel):
|
|
26
26
|
"""
|
|
27
|
-
|
|
27
|
+
ProjectsCreateRequest
|
|
28
28
|
""" # noqa: E501
|
|
29
|
-
|
|
30
|
-
|
|
29
|
+
name: StrictStr = Field(description="Name of the project (must be unique within the space)")
|
|
30
|
+
space_id: StrictStr = Field(description="ID of the space to create the project in")
|
|
31
|
+
__properties: ClassVar[List[str]] = ["name", "space_id"]
|
|
31
32
|
|
|
32
33
|
model_config = ConfigDict(
|
|
33
34
|
populate_by_name=True,
|
|
@@ -47,7 +48,7 @@ class DatasetsListExamples200Response(BaseModel):
|
|
|
47
48
|
|
|
48
49
|
@classmethod
|
|
49
50
|
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
50
|
-
"""Create an instance of
|
|
51
|
+
"""Create an instance of ProjectsCreateRequest from a JSON string"""
|
|
51
52
|
return cls.from_dict(json.loads(json_str))
|
|
52
53
|
|
|
53
54
|
def to_dict(self) -> Dict[str, Any]:
|
|
@@ -72,7 +73,7 @@ class DatasetsListExamples200Response(BaseModel):
|
|
|
72
73
|
|
|
73
74
|
@classmethod
|
|
74
75
|
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
75
|
-
"""Create an instance of
|
|
76
|
+
"""Create an instance of ProjectsCreateRequest from a dict"""
|
|
76
77
|
if obj is None:
|
|
77
78
|
return None
|
|
78
79
|
|
|
@@ -82,10 +83,11 @@ class DatasetsListExamples200Response(BaseModel):
|
|
|
82
83
|
# raise errors for additional fields in the input
|
|
83
84
|
for _key in obj.keys():
|
|
84
85
|
if _key not in cls.__properties:
|
|
85
|
-
raise ValueError("Error due to additional fields (not defined in
|
|
86
|
+
raise ValueError("Error due to additional fields (not defined in ProjectsCreateRequest) in the input: " + _key)
|
|
86
87
|
|
|
87
88
|
_obj = cls.model_validate({
|
|
88
|
-
"
|
|
89
|
+
"name": obj.get("name"),
|
|
90
|
+
"space_id": obj.get("space_id")
|
|
89
91
|
})
|
|
90
92
|
return _obj
|
|
91
93
|
|