arize 8.0.0a23__py3-none-any.whl → 8.0.0b1__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 +11 -10
- arize/_exporter/client.py +1 -1
- arize/_generated/api_client/__init__.py +0 -2
- arize/_generated/api_client/models/__init__.py +0 -1
- arize/_generated/api_client/models/datasets_create_request.py +2 -10
- arize/_generated/api_client/models/datasets_examples_insert_request.py +2 -10
- arize/_generated/api_client/test/test_datasets_create_request.py +2 -6
- arize/_generated/api_client/test/test_datasets_examples_insert_request.py +2 -6
- arize/_generated/api_client/test/test_datasets_examples_list200_response.py +2 -6
- arize/_generated/api_client/test/test_datasets_examples_update_request.py +2 -6
- arize/_generated/api_client/test/test_experiments_create_request.py +2 -6
- arize/_generated/api_client/test/test_experiments_runs_list200_response.py +2 -6
- arize/_generated/api_client_README.md +0 -1
- arize/client.py +47 -163
- arize/config.py +59 -100
- arize/datasets/client.py +11 -6
- arize/embeddings/nlp_generators.py +12 -6
- arize/embeddings/tabular_generators.py +14 -11
- arize/experiments/__init__.py +12 -0
- arize/experiments/client.py +13 -9
- arize/experiments/functions.py +6 -6
- arize/experiments/types.py +3 -3
- arize/{models → ml}/batch_validation/errors.py +2 -2
- arize/{models → ml}/batch_validation/validator.py +5 -3
- arize/{models → ml}/casting.py +42 -78
- arize/{models → ml}/client.py +19 -17
- arize/{models → ml}/proto.py +2 -2
- arize/{models → ml}/stream_validation.py +1 -1
- arize/{models → ml}/surrogate_explainer/mimic.py +6 -2
- arize/{types.py → ml/types.py} +99 -234
- arize/pre_releases.py +2 -1
- arize/projects/client.py +11 -6
- arize/spans/client.py +91 -86
- arize/spans/conversion.py +11 -4
- arize/spans/validation/common/value_validation.py +1 -1
- arize/spans/validation/spans/dataframe_form_validation.py +1 -1
- arize/spans/validation/spans/value_validation.py +2 -1
- arize/utils/dataframe.py +1 -1
- arize/utils/online_tasks/dataframe_preprocessor.py +5 -6
- arize/utils/types.py +105 -0
- arize/version.py +1 -1
- {arize-8.0.0a23.dist-info → arize-8.0.0b1.dist-info}/METADATA +56 -59
- {arize-8.0.0a23.dist-info → arize-8.0.0b1.dist-info}/RECORD +50 -51
- arize/_generated/api_client/models/primitive_value.py +0 -172
- arize/_generated/api_client/test/test_primitive_value.py +0 -50
- /arize/{models → ml}/__init__.py +0 -0
- /arize/{models → ml}/batch_validation/__init__.py +0 -0
- /arize/{models → ml}/bounded_executor.py +0 -0
- /arize/{models → ml}/surrogate_explainer/__init__.py +0 -0
- {arize-8.0.0a23.dist-info → arize-8.0.0b1.dist-info}/WHEEL +0 -0
- {arize-8.0.0a23.dist-info → arize-8.0.0b1.dist-info}/licenses/LICENSE +0 -0
- {arize-8.0.0a23.dist-info → arize-8.0.0b1.dist-info}/licenses/NOTICE +0 -0
arize/{models → ml}/client.py
RENAMED
|
@@ -33,13 +33,13 @@ from arize.exceptions.parameters import (
|
|
|
33
33
|
)
|
|
34
34
|
from arize.exceptions.spaces import MissingSpaceIDError
|
|
35
35
|
from arize.logging import get_truncation_warning_message
|
|
36
|
-
from arize.
|
|
37
|
-
from arize.
|
|
38
|
-
from arize.
|
|
36
|
+
from arize.ml.bounded_executor import BoundedExecutor
|
|
37
|
+
from arize.ml.casting import cast_dictionary, cast_typed_columns
|
|
38
|
+
from arize.ml.stream_validation import (
|
|
39
39
|
validate_and_convert_prediction_id,
|
|
40
40
|
validate_label,
|
|
41
41
|
)
|
|
42
|
-
from arize.types import (
|
|
42
|
+
from arize.ml.types import (
|
|
43
43
|
CATEGORICAL_MODEL_TYPES,
|
|
44
44
|
NUMERIC_MODEL_TYPES,
|
|
45
45
|
ActualLabelTypes,
|
|
@@ -57,8 +57,8 @@ from arize.types import (
|
|
|
57
57
|
SimilaritySearchParams,
|
|
58
58
|
TypedValue,
|
|
59
59
|
convert_element,
|
|
60
|
-
is_list_of,
|
|
61
60
|
)
|
|
61
|
+
from arize.utils.types import is_list_of
|
|
62
62
|
|
|
63
63
|
if TYPE_CHECKING:
|
|
64
64
|
import concurrent.futures as cf
|
|
@@ -95,14 +95,18 @@ _MIMIC_EXTRA = "mimic-explainer"
|
|
|
95
95
|
|
|
96
96
|
|
|
97
97
|
class MLModelsClient:
|
|
98
|
-
"""Client for logging ML model predictions and actuals to Arize.
|
|
98
|
+
"""Client for logging ML model predictions and actuals to Arize.
|
|
99
99
|
|
|
100
|
-
|
|
101
|
-
|
|
100
|
+
This class is primarily intended for internal use within the SDK. Users are
|
|
101
|
+
highly encouraged to access resource-specific functionality via
|
|
102
|
+
:class:`arize.ArizeClient`.
|
|
103
|
+
"""
|
|
102
104
|
|
|
103
|
-
|
|
104
|
-
sdk_config: SDK configuration containing API endpoints and credentials.
|
|
105
|
+
def __init__(self, *, sdk_config: SDKConfiguration) -> None:
|
|
105
106
|
"""
|
|
107
|
+
Args:
|
|
108
|
+
sdk_config: Resolved SDK configuration.
|
|
109
|
+
""" # noqa: D205, D212
|
|
106
110
|
self._sdk_config = sdk_config
|
|
107
111
|
|
|
108
112
|
# internal cache for the futures session
|
|
@@ -202,7 +206,7 @@ class MLModelsClient:
|
|
|
202
206
|
"""
|
|
203
207
|
require(_STREAM_EXTRA, _STREAM_DEPS)
|
|
204
208
|
from arize._generated.protocol.rec import public_pb2 as pb2
|
|
205
|
-
from arize.
|
|
209
|
+
from arize.ml.proto import (
|
|
206
210
|
get_pb_dictionary,
|
|
207
211
|
get_pb_label,
|
|
208
212
|
get_pb_timestamp,
|
|
@@ -374,9 +378,7 @@ class MLModelsClient:
|
|
|
374
378
|
if embedding_features or prompt or response:
|
|
375
379
|
# NOTE: Deep copy is necessary to avoid side effects on the original input dictionary
|
|
376
380
|
combined_embedding_features = (
|
|
377
|
-
|
|
378
|
-
if embedding_features
|
|
379
|
-
else {}
|
|
381
|
+
embedding_features.copy() if embedding_features else {}
|
|
380
382
|
)
|
|
381
383
|
# Map prompt as embedding features for generative models
|
|
382
384
|
if prompt is not None:
|
|
@@ -523,7 +525,7 @@ class MLModelsClient:
|
|
|
523
525
|
indexes=None,
|
|
524
526
|
)
|
|
525
527
|
|
|
526
|
-
def
|
|
528
|
+
def log(
|
|
527
529
|
self,
|
|
528
530
|
*,
|
|
529
531
|
space_id: str,
|
|
@@ -597,7 +599,7 @@ class MLModelsClient:
|
|
|
597
599
|
import pandas.api.types as ptypes
|
|
598
600
|
import pyarrow as pa
|
|
599
601
|
|
|
600
|
-
from arize.
|
|
602
|
+
from arize.ml.batch_validation.validator import Validator
|
|
601
603
|
from arize.utils.arrow import post_arrow_table
|
|
602
604
|
from arize.utils.dataframe import remove_extraneous_columns
|
|
603
605
|
|
|
@@ -686,7 +688,7 @@ class MLModelsClient:
|
|
|
686
688
|
|
|
687
689
|
if surrogate_explainability:
|
|
688
690
|
require(_MIMIC_EXTRA, _MIMIC_DEPS)
|
|
689
|
-
from arize.
|
|
691
|
+
from arize.ml.surrogate_explainer.mimic import Mimic
|
|
690
692
|
|
|
691
693
|
logger.debug("Running surrogate_explainability.")
|
|
692
694
|
if schema.shap_values_column_names:
|
arize/{models → ml}/proto.py
RENAMED
|
@@ -8,7 +8,7 @@ from google.protobuf.wrappers_pb2 import DoubleValue, StringValue
|
|
|
8
8
|
|
|
9
9
|
from arize._generated.protocol.rec import public_pb2 as pb2
|
|
10
10
|
from arize.exceptions.parameters import InvalidValueType
|
|
11
|
-
from arize.types import (
|
|
11
|
+
from arize.ml.types import (
|
|
12
12
|
CATEGORICAL_MODEL_TYPES,
|
|
13
13
|
NUMERIC_MODEL_TYPES,
|
|
14
14
|
Embedding,
|
|
@@ -22,8 +22,8 @@ from arize.types import (
|
|
|
22
22
|
RankingPredictionLabel,
|
|
23
23
|
SemanticSegmentationLabel,
|
|
24
24
|
convert_element,
|
|
25
|
-
is_list_of,
|
|
26
25
|
)
|
|
26
|
+
from arize.utils.types import is_list_of
|
|
27
27
|
|
|
28
28
|
|
|
29
29
|
def get_pb_dictionary(d: dict[object, object] | None) -> dict[str, object]:
|
|
@@ -6,7 +6,7 @@ from arize.constants.ml import MAX_PREDICTION_ID_LEN, MIN_PREDICTION_ID_LEN
|
|
|
6
6
|
from arize.exceptions.parameters import (
|
|
7
7
|
InvalidValueType,
|
|
8
8
|
)
|
|
9
|
-
from arize.types import (
|
|
9
|
+
from arize.ml.types import (
|
|
10
10
|
CATEGORICAL_MODEL_TYPES,
|
|
11
11
|
NUMERIC_MODEL_TYPES,
|
|
12
12
|
ActualLabelTypes,
|
|
@@ -15,12 +15,16 @@ from interpret_community.mimic.mimic_explainer import (
|
|
|
15
15
|
)
|
|
16
16
|
from sklearn.preprocessing import LabelEncoder
|
|
17
17
|
|
|
18
|
-
from arize.types import
|
|
18
|
+
from arize.ml.types import (
|
|
19
|
+
CATEGORICAL_MODEL_TYPES,
|
|
20
|
+
NUMERIC_MODEL_TYPES,
|
|
21
|
+
ModelTypes,
|
|
22
|
+
)
|
|
19
23
|
|
|
20
24
|
if TYPE_CHECKING:
|
|
21
25
|
from collections.abc import Callable
|
|
22
26
|
|
|
23
|
-
from arize.types import Schema
|
|
27
|
+
from arize.ml.types import Schema
|
|
24
28
|
|
|
25
29
|
|
|
26
30
|
class Mimic:
|