arize 8.0.0a18__tar.gz → 8.0.0a19__tar.gz
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-8.0.0a18 → arize-8.0.0a19}/PKG-INFO +3 -3
- {arize-8.0.0a18 → arize-8.0.0a19}/README.md +2 -2
- {arize-8.0.0a18 → arize-8.0.0a19}/src/arize/client.py +38 -4
- {arize-8.0.0a18 → arize-8.0.0a19}/src/arize/config.py +7 -2
- {arize-8.0.0a18 → arize-8.0.0a19}/src/arize/datasets/client.py +5 -3
- {arize-8.0.0a18 → arize-8.0.0a19}/src/arize/experiments/client.py +8 -11
- {arize-8.0.0a18 → arize-8.0.0a19}/src/arize/models/client.py +5 -1
- {arize-8.0.0a18 → arize-8.0.0a19}/src/arize/spans/client.py +7 -1
- arize-8.0.0a19/src/arize/version.py +1 -0
- arize-8.0.0a18/src/arize/version.py +0 -1
- {arize-8.0.0a18 → arize-8.0.0a19}/.gitignore +0 -0
- {arize-8.0.0a18 → arize-8.0.0a19}/LICENSE.md +0 -0
- {arize-8.0.0a18 → arize-8.0.0a19}/pyproject.toml +0 -0
- {arize-8.0.0a18 → arize-8.0.0a19}/src/arize/__init__.py +0 -0
- {arize-8.0.0a18 → arize-8.0.0a19}/src/arize/_exporter/__init__.py +0 -0
- {arize-8.0.0a18 → arize-8.0.0a19}/src/arize/_exporter/client.py +0 -0
- {arize-8.0.0a18 → arize-8.0.0a19}/src/arize/_exporter/parsers/__init__.py +0 -0
- {arize-8.0.0a18 → arize-8.0.0a19}/src/arize/_exporter/parsers/tracing_data_parser.py +0 -0
- {arize-8.0.0a18 → arize-8.0.0a19}/src/arize/_exporter/validation.py +0 -0
- {arize-8.0.0a18 → arize-8.0.0a19}/src/arize/_flight/__init__.py +0 -0
- {arize-8.0.0a18 → arize-8.0.0a19}/src/arize/_flight/client.py +0 -0
- {arize-8.0.0a18 → arize-8.0.0a19}/src/arize/_flight/types.py +0 -0
- {arize-8.0.0a18 → arize-8.0.0a19}/src/arize/_generated/__init__.py +0 -0
- {arize-8.0.0a18 → arize-8.0.0a19}/src/arize/_generated/api_client/__init__.py +0 -0
- {arize-8.0.0a18 → arize-8.0.0a19}/src/arize/_generated/api_client/api/__init__.py +0 -0
- {arize-8.0.0a18 → arize-8.0.0a19}/src/arize/_generated/api_client/api/datasets_api.py +0 -0
- {arize-8.0.0a18 → arize-8.0.0a19}/src/arize/_generated/api_client/api/experiments_api.py +0 -0
- {arize-8.0.0a18 → arize-8.0.0a19}/src/arize/_generated/api_client/api_client.py +0 -0
- {arize-8.0.0a18 → arize-8.0.0a19}/src/arize/_generated/api_client/api_response.py +0 -0
- {arize-8.0.0a18 → arize-8.0.0a19}/src/arize/_generated/api_client/configuration.py +0 -0
- {arize-8.0.0a18 → arize-8.0.0a19}/src/arize/_generated/api_client/exceptions.py +0 -0
- {arize-8.0.0a18 → arize-8.0.0a19}/src/arize/_generated/api_client/models/__init__.py +0 -0
- {arize-8.0.0a18 → arize-8.0.0a19}/src/arize/_generated/api_client/models/dataset.py +0 -0
- {arize-8.0.0a18 → arize-8.0.0a19}/src/arize/_generated/api_client/models/dataset_version.py +0 -0
- {arize-8.0.0a18 → arize-8.0.0a19}/src/arize/_generated/api_client/models/datasets_create_request.py +0 -0
- {arize-8.0.0a18 → arize-8.0.0a19}/src/arize/_generated/api_client/models/datasets_list200_response.py +0 -0
- {arize-8.0.0a18 → arize-8.0.0a19}/src/arize/_generated/api_client/models/datasets_list_examples200_response.py +0 -0
- {arize-8.0.0a18 → arize-8.0.0a19}/src/arize/_generated/api_client/models/error.py +0 -0
- {arize-8.0.0a18 → arize-8.0.0a19}/src/arize/_generated/api_client/models/experiment.py +0 -0
- {arize-8.0.0a18 → arize-8.0.0a19}/src/arize/_generated/api_client/models/experiments_create_request.py +0 -0
- {arize-8.0.0a18 → arize-8.0.0a19}/src/arize/_generated/api_client/models/experiments_list200_response.py +0 -0
- {arize-8.0.0a18 → arize-8.0.0a19}/src/arize/_generated/api_client/models/experiments_runs_list200_response.py +0 -0
- {arize-8.0.0a18 → arize-8.0.0a19}/src/arize/_generated/api_client/rest.py +0 -0
- {arize-8.0.0a18 → arize-8.0.0a19}/src/arize/_generated/api_client/test/__init__.py +0 -0
- {arize-8.0.0a18 → arize-8.0.0a19}/src/arize/_generated/api_client/test/test_dataset.py +0 -0
- {arize-8.0.0a18 → arize-8.0.0a19}/src/arize/_generated/api_client/test/test_dataset_version.py +0 -0
- {arize-8.0.0a18 → arize-8.0.0a19}/src/arize/_generated/api_client/test/test_datasets_api.py +0 -0
- {arize-8.0.0a18 → arize-8.0.0a19}/src/arize/_generated/api_client/test/test_datasets_create_request.py +0 -0
- {arize-8.0.0a18 → arize-8.0.0a19}/src/arize/_generated/api_client/test/test_datasets_list200_response.py +0 -0
- {arize-8.0.0a18 → arize-8.0.0a19}/src/arize/_generated/api_client/test/test_datasets_list_examples200_response.py +0 -0
- {arize-8.0.0a18 → arize-8.0.0a19}/src/arize/_generated/api_client/test/test_error.py +0 -0
- {arize-8.0.0a18 → arize-8.0.0a19}/src/arize/_generated/api_client/test/test_experiment.py +0 -0
- {arize-8.0.0a18 → arize-8.0.0a19}/src/arize/_generated/api_client/test/test_experiments_api.py +0 -0
- {arize-8.0.0a18 → arize-8.0.0a19}/src/arize/_generated/api_client/test/test_experiments_create_request.py +0 -0
- {arize-8.0.0a18 → arize-8.0.0a19}/src/arize/_generated/api_client/test/test_experiments_list200_response.py +0 -0
- {arize-8.0.0a18 → arize-8.0.0a19}/src/arize/_generated/api_client/test/test_experiments_runs_list200_response.py +0 -0
- {arize-8.0.0a18 → arize-8.0.0a19}/src/arize/_generated/api_client_README.md +0 -0
- {arize-8.0.0a18 → arize-8.0.0a19}/src/arize/_generated/protocol/__init__.py +0 -0
- {arize-8.0.0a18 → arize-8.0.0a19}/src/arize/_generated/protocol/flight/__init__.py +0 -0
- {arize-8.0.0a18 → arize-8.0.0a19}/src/arize/_generated/protocol/flight/export_pb2.py +0 -0
- {arize-8.0.0a18 → arize-8.0.0a19}/src/arize/_generated/protocol/flight/ingest_pb2.py +0 -0
- {arize-8.0.0a18 → arize-8.0.0a19}/src/arize/_generated/protocol/rec/__init__.py +0 -0
- {arize-8.0.0a18 → arize-8.0.0a19}/src/arize/_generated/protocol/rec/public_pb2.py +0 -0
- {arize-8.0.0a18 → arize-8.0.0a19}/src/arize/_lazy.py +0 -0
- {arize-8.0.0a18 → arize-8.0.0a19}/src/arize/constants/__init__.py +0 -0
- {arize-8.0.0a18 → arize-8.0.0a19}/src/arize/constants/config.py +0 -0
- {arize-8.0.0a18 → arize-8.0.0a19}/src/arize/constants/ml.py +0 -0
- {arize-8.0.0a18 → arize-8.0.0a19}/src/arize/constants/model_mapping.json +0 -0
- {arize-8.0.0a18 → arize-8.0.0a19}/src/arize/constants/openinference.py +0 -0
- {arize-8.0.0a18 → arize-8.0.0a19}/src/arize/constants/pyarrow.py +0 -0
- {arize-8.0.0a18 → arize-8.0.0a19}/src/arize/constants/spans.py +0 -0
- {arize-8.0.0a18 → arize-8.0.0a19}/src/arize/datasets/__init__.py +0 -0
- {arize-8.0.0a18 → arize-8.0.0a19}/src/arize/datasets/errors.py +0 -0
- {arize-8.0.0a18 → arize-8.0.0a19}/src/arize/datasets/validation.py +0 -0
- {arize-8.0.0a18 → arize-8.0.0a19}/src/arize/embeddings/__init__.py +0 -0
- {arize-8.0.0a18 → arize-8.0.0a19}/src/arize/embeddings/auto_generator.py +0 -0
- {arize-8.0.0a18 → arize-8.0.0a19}/src/arize/embeddings/base_generators.py +0 -0
- {arize-8.0.0a18 → arize-8.0.0a19}/src/arize/embeddings/constants.py +0 -0
- {arize-8.0.0a18 → arize-8.0.0a19}/src/arize/embeddings/cv_generators.py +0 -0
- {arize-8.0.0a18 → arize-8.0.0a19}/src/arize/embeddings/errors.py +0 -0
- {arize-8.0.0a18 → arize-8.0.0a19}/src/arize/embeddings/nlp_generators.py +0 -0
- {arize-8.0.0a18 → arize-8.0.0a19}/src/arize/embeddings/tabular_generators.py +0 -0
- {arize-8.0.0a18 → arize-8.0.0a19}/src/arize/embeddings/usecases.py +0 -0
- {arize-8.0.0a18 → arize-8.0.0a19}/src/arize/exceptions/__init__.py +0 -0
- {arize-8.0.0a18 → arize-8.0.0a19}/src/arize/exceptions/auth.py +0 -0
- {arize-8.0.0a18 → arize-8.0.0a19}/src/arize/exceptions/base.py +0 -0
- {arize-8.0.0a18 → arize-8.0.0a19}/src/arize/exceptions/models.py +0 -0
- {arize-8.0.0a18 → arize-8.0.0a19}/src/arize/exceptions/parameters.py +0 -0
- {arize-8.0.0a18 → arize-8.0.0a19}/src/arize/exceptions/spaces.py +0 -0
- {arize-8.0.0a18 → arize-8.0.0a19}/src/arize/exceptions/types.py +0 -0
- {arize-8.0.0a18 → arize-8.0.0a19}/src/arize/exceptions/values.py +0 -0
- {arize-8.0.0a18 → arize-8.0.0a19}/src/arize/experiments/__init__.py +0 -0
- {arize-8.0.0a18 → arize-8.0.0a19}/src/arize/experiments/evaluators/__init__.py +0 -0
- {arize-8.0.0a18 → arize-8.0.0a19}/src/arize/experiments/evaluators/base.py +0 -0
- {arize-8.0.0a18 → arize-8.0.0a19}/src/arize/experiments/evaluators/exceptions.py +0 -0
- {arize-8.0.0a18 → arize-8.0.0a19}/src/arize/experiments/evaluators/executors.py +0 -0
- {arize-8.0.0a18 → arize-8.0.0a19}/src/arize/experiments/evaluators/rate_limiters.py +0 -0
- {arize-8.0.0a18 → arize-8.0.0a19}/src/arize/experiments/evaluators/types.py +0 -0
- {arize-8.0.0a18 → arize-8.0.0a19}/src/arize/experiments/evaluators/utils.py +0 -0
- {arize-8.0.0a18 → arize-8.0.0a19}/src/arize/experiments/functions.py +0 -0
- {arize-8.0.0a18 → arize-8.0.0a19}/src/arize/experiments/tracing.py +0 -0
- {arize-8.0.0a18 → arize-8.0.0a19}/src/arize/experiments/types.py +0 -0
- {arize-8.0.0a18 → arize-8.0.0a19}/src/arize/logging.py +0 -0
- {arize-8.0.0a18 → arize-8.0.0a19}/src/arize/models/__init__.py +0 -0
- {arize-8.0.0a18 → arize-8.0.0a19}/src/arize/models/batch_validation/__init__.py +0 -0
- {arize-8.0.0a18 → arize-8.0.0a19}/src/arize/models/batch_validation/errors.py +0 -0
- {arize-8.0.0a18 → arize-8.0.0a19}/src/arize/models/batch_validation/validator.py +0 -0
- {arize-8.0.0a18 → arize-8.0.0a19}/src/arize/models/bounded_executor.py +0 -0
- {arize-8.0.0a18 → arize-8.0.0a19}/src/arize/models/casting.py +0 -0
- {arize-8.0.0a18 → arize-8.0.0a19}/src/arize/models/proto.py +0 -0
- {arize-8.0.0a18 → arize-8.0.0a19}/src/arize/models/stream_validation.py +0 -0
- {arize-8.0.0a18 → arize-8.0.0a19}/src/arize/models/surrogate_explainer/__init__.py +0 -0
- {arize-8.0.0a18 → arize-8.0.0a19}/src/arize/models/surrogate_explainer/mimic.py +0 -0
- {arize-8.0.0a18 → arize-8.0.0a19}/src/arize/spans/__init__.py +0 -0
- {arize-8.0.0a18 → arize-8.0.0a19}/src/arize/spans/columns.py +0 -0
- {arize-8.0.0a18 → arize-8.0.0a19}/src/arize/spans/conversion.py +0 -0
- {arize-8.0.0a18 → arize-8.0.0a19}/src/arize/spans/validation/__init__.py +0 -0
- {arize-8.0.0a18 → arize-8.0.0a19}/src/arize/spans/validation/annotations/__init__.py +0 -0
- {arize-8.0.0a18 → arize-8.0.0a19}/src/arize/spans/validation/annotations/annotations_validation.py +0 -0
- {arize-8.0.0a18 → arize-8.0.0a19}/src/arize/spans/validation/annotations/dataframe_form_validation.py +0 -0
- {arize-8.0.0a18 → arize-8.0.0a19}/src/arize/spans/validation/annotations/value_validation.py +0 -0
- {arize-8.0.0a18 → arize-8.0.0a19}/src/arize/spans/validation/common/__init__.py +0 -0
- {arize-8.0.0a18 → arize-8.0.0a19}/src/arize/spans/validation/common/argument_validation.py +0 -0
- {arize-8.0.0a18 → arize-8.0.0a19}/src/arize/spans/validation/common/dataframe_form_validation.py +0 -0
- {arize-8.0.0a18 → arize-8.0.0a19}/src/arize/spans/validation/common/errors.py +0 -0
- {arize-8.0.0a18 → arize-8.0.0a19}/src/arize/spans/validation/common/value_validation.py +0 -0
- {arize-8.0.0a18 → arize-8.0.0a19}/src/arize/spans/validation/evals/__init__.py +0 -0
- {arize-8.0.0a18 → arize-8.0.0a19}/src/arize/spans/validation/evals/dataframe_form_validation.py +0 -0
- {arize-8.0.0a18 → arize-8.0.0a19}/src/arize/spans/validation/evals/evals_validation.py +0 -0
- {arize-8.0.0a18 → arize-8.0.0a19}/src/arize/spans/validation/evals/value_validation.py +0 -0
- {arize-8.0.0a18 → arize-8.0.0a19}/src/arize/spans/validation/metadata/__init__.py +0 -0
- {arize-8.0.0a18 → arize-8.0.0a19}/src/arize/spans/validation/metadata/argument_validation.py +0 -0
- {arize-8.0.0a18 → arize-8.0.0a19}/src/arize/spans/validation/metadata/dataframe_form_validation.py +0 -0
- {arize-8.0.0a18 → arize-8.0.0a19}/src/arize/spans/validation/metadata/value_validation.py +0 -0
- {arize-8.0.0a18 → arize-8.0.0a19}/src/arize/spans/validation/spans/__init__.py +0 -0
- {arize-8.0.0a18 → arize-8.0.0a19}/src/arize/spans/validation/spans/dataframe_form_validation.py +0 -0
- {arize-8.0.0a18 → arize-8.0.0a19}/src/arize/spans/validation/spans/spans_validation.py +0 -0
- {arize-8.0.0a18 → arize-8.0.0a19}/src/arize/spans/validation/spans/value_validation.py +0 -0
- {arize-8.0.0a18 → arize-8.0.0a19}/src/arize/types.py +0 -0
- {arize-8.0.0a18 → arize-8.0.0a19}/src/arize/utils/__init__.py +0 -0
- {arize-8.0.0a18 → arize-8.0.0a19}/src/arize/utils/arrow.py +0 -0
- {arize-8.0.0a18 → arize-8.0.0a19}/src/arize/utils/cache.py +0 -0
- {arize-8.0.0a18 → arize-8.0.0a19}/src/arize/utils/dataframe.py +0 -0
- {arize-8.0.0a18 → arize-8.0.0a19}/src/arize/utils/online_tasks/__init__.py +0 -0
- {arize-8.0.0a18 → arize-8.0.0a19}/src/arize/utils/online_tasks/dataframe_preprocessor.py +0 -0
- {arize-8.0.0a18 → arize-8.0.0a19}/src/arize/utils/openinference_conversion.py +0 -0
- {arize-8.0.0a18 → arize-8.0.0a19}/src/arize/utils/proto.py +0 -0
- {arize-8.0.0a18 → arize-8.0.0a19}/src/arize/utils/size.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: arize
|
|
3
|
-
Version: 8.0.
|
|
3
|
+
Version: 8.0.0a19
|
|
4
4
|
Summary: A helper library to interact with Arize AI APIs
|
|
5
5
|
Project-URL: Homepage, https://arize.com
|
|
6
6
|
Project-URL: Documentation, https://docs.arize.com/arize
|
|
@@ -672,7 +672,7 @@ The default behavior of Arize's logs is: enabled, `INFO` level, and not structur
|
|
|
672
672
|
|
|
673
673
|
## Caching
|
|
674
674
|
|
|
675
|
-
When downloading big segments of data from Arize, such as a `Dataset` with all of its examples, the SDK will cache the file in `parquet` format under `~/.arize/datasets/dataset_<updated_at_timestamp>.parquet`.
|
|
675
|
+
When downloading big segments of data from Arize, such as a `Dataset` with all of its examples, the SDK will cache the file in `parquet` format under `~/.arize/cache/datasets/dataset_<updated_at_timestamp>.parquet`.
|
|
676
676
|
|
|
677
677
|
### In Code
|
|
678
678
|
|
|
@@ -700,7 +700,7 @@ os.environ["ARIZE_DIRECTORY"] = "~/.arize"
|
|
|
700
700
|
|
|
701
701
|
### Clean the cache
|
|
702
702
|
|
|
703
|
-
To clean the cache you can directly `rm` the files or directory.
|
|
703
|
+
To clean the cache you can directly `rm` the files or directory. In addition, the client has the option to help with that as well using `client.clear_cache()`, which will delete the `cache/` directory inside the _arize directory_ (defaults to `~/.arize`).
|
|
704
704
|
|
|
705
705
|
# Community
|
|
706
706
|
|
|
@@ -608,7 +608,7 @@ The default behavior of Arize's logs is: enabled, `INFO` level, and not structur
|
|
|
608
608
|
|
|
609
609
|
## Caching
|
|
610
610
|
|
|
611
|
-
When downloading big segments of data from Arize, such as a `Dataset` with all of its examples, the SDK will cache the file in `parquet` format under `~/.arize/datasets/dataset_<updated_at_timestamp>.parquet`.
|
|
611
|
+
When downloading big segments of data from Arize, such as a `Dataset` with all of its examples, the SDK will cache the file in `parquet` format under `~/.arize/cache/datasets/dataset_<updated_at_timestamp>.parquet`.
|
|
612
612
|
|
|
613
613
|
### In Code
|
|
614
614
|
|
|
@@ -636,7 +636,7 @@ os.environ["ARIZE_DIRECTORY"] = "~/.arize"
|
|
|
636
636
|
|
|
637
637
|
### Clean the cache
|
|
638
638
|
|
|
639
|
-
To clean the cache you can directly `rm` the files or directory.
|
|
639
|
+
To clean the cache you can directly `rm` the files or directory. In addition, the client has the option to help with that as well using `client.clear_cache()`, which will delete the `cache/` directory inside the _arize directory_ (defaults to `~/.arize`).
|
|
640
640
|
|
|
641
641
|
# Community
|
|
642
642
|
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
from __future__ import annotations
|
|
2
2
|
|
|
3
|
+
import logging
|
|
4
|
+
import shutil
|
|
5
|
+
from pathlib import Path
|
|
3
6
|
from typing import TYPE_CHECKING
|
|
4
7
|
|
|
5
8
|
from arize._lazy import LazySubclientsMixin
|
|
@@ -11,17 +14,16 @@ if TYPE_CHECKING:
|
|
|
11
14
|
from arize.models.client import MLModelsClient
|
|
12
15
|
from arize.spans.client import SpansClient
|
|
13
16
|
|
|
17
|
+
logger = logging.getLogger(__name__)
|
|
14
18
|
|
|
19
|
+
|
|
20
|
+
# TODO(Kiko): test caching in colab environment
|
|
15
21
|
# TODO(Kiko): models need to follow resource first pattern
|
|
16
22
|
# - models.DatasetsList200Response
|
|
17
23
|
# - models.DatasetsListExamples200Response
|
|
18
24
|
# - models.ExperimentsList200Response
|
|
19
25
|
# - models.ExperimentsRunsList200Response
|
|
20
|
-
# TODO(Kiko): Root client should have option to clear caches
|
|
21
|
-
# TODO(Kiko): Document caching behavior
|
|
22
|
-
# TODO(Kiko): Force keyword arguments
|
|
23
26
|
# TODO(Kiko): Protobuf versioning is too old
|
|
24
|
-
# TODO(Kiko): Make sure the client has same options as SDKConfiguration
|
|
25
27
|
# TODO(Kiko): It does not make any sense to require space ID in run_experiment, dataset ID should suffice
|
|
26
28
|
# TODO(Kiko): Should probably wrap every single method of gen clients so that we can add nice docstrings
|
|
27
29
|
# TODO(Kiko): Add flight max_chunksize opt to write_table. In config?
|
|
@@ -33,6 +35,8 @@ if TYPE_CHECKING:
|
|
|
33
35
|
# TODO(Kiko): Go over **every file** and do not import anything at runtime, use `if TYPE_CHECKING`
|
|
34
36
|
# with `from __future__ import annotations` (must include for Python < 3.11)
|
|
35
37
|
# TODO(Kiko): Go over docstrings
|
|
38
|
+
# TODO(Kiko): Go headers on each logging call
|
|
39
|
+
# TODO(Kiko): Make sure the client has same options as SDKConfiguration
|
|
36
40
|
class ArizeClient(LazySubclientsMixin):
|
|
37
41
|
"""
|
|
38
42
|
Root client for the Arize SDK. All parameters are optional. If not provided, they will be read
|
|
@@ -114,9 +118,12 @@ class ArizeClient(LazySubclientsMixin):
|
|
|
114
118
|
|
|
115
119
|
def __init__(
|
|
116
120
|
self,
|
|
121
|
+
*,
|
|
117
122
|
api_key: str | None = None,
|
|
118
123
|
api_host: str | None = None,
|
|
119
124
|
api_scheme: str | None = None,
|
|
125
|
+
otlp_host: str | None = None,
|
|
126
|
+
otlp_scheme: str | None = None,
|
|
120
127
|
flight_server_host: str | None = None,
|
|
121
128
|
flight_server_port: int | None = None,
|
|
122
129
|
flight_scheme: str | None = None,
|
|
@@ -124,6 +131,9 @@ class ArizeClient(LazySubclientsMixin):
|
|
|
124
131
|
request_verify: bool | None = None,
|
|
125
132
|
stream_max_workers: int | None = None,
|
|
126
133
|
stream_max_queue_bound: int | None = None,
|
|
134
|
+
max_http_payload_size_mb: float | None = None,
|
|
135
|
+
arize_direcory: str | None = None,
|
|
136
|
+
enable_caching: bool | None = None,
|
|
127
137
|
):
|
|
128
138
|
cfg_kwargs: dict = {}
|
|
129
139
|
if api_key is not None:
|
|
@@ -132,6 +142,10 @@ class ArizeClient(LazySubclientsMixin):
|
|
|
132
142
|
cfg_kwargs["api_host"] = api_host
|
|
133
143
|
if api_scheme is not None:
|
|
134
144
|
cfg_kwargs["api_scheme"] = api_scheme
|
|
145
|
+
if otlp_host is not None:
|
|
146
|
+
cfg_kwargs["otlp_host"] = otlp_host
|
|
147
|
+
if otlp_scheme is not None:
|
|
148
|
+
cfg_kwargs["otlp_scheme"] = otlp_scheme
|
|
135
149
|
if flight_server_host is not None:
|
|
136
150
|
cfg_kwargs["flight_server_host"] = flight_server_host
|
|
137
151
|
if flight_server_port is not None:
|
|
@@ -146,6 +160,12 @@ class ArizeClient(LazySubclientsMixin):
|
|
|
146
160
|
cfg_kwargs["stream_max_workers"] = stream_max_workers
|
|
147
161
|
if stream_max_queue_bound is not None:
|
|
148
162
|
cfg_kwargs["stream_max_queue_bound"] = stream_max_queue_bound
|
|
163
|
+
if max_http_payload_size_mb is not None:
|
|
164
|
+
cfg_kwargs["max_http_payload_size_mb"] = max_http_payload_size_mb
|
|
165
|
+
if arize_direcory is not None:
|
|
166
|
+
cfg_kwargs["arize_direcory"] = arize_direcory
|
|
167
|
+
if enable_caching is not None:
|
|
168
|
+
cfg_kwargs["enable_caching"] = enable_caching
|
|
149
169
|
|
|
150
170
|
# Only the explicitly provided fields are passed; the rest use
|
|
151
171
|
# SDKConfiguration’s default factories / defaults.
|
|
@@ -182,3 +202,17 @@ class ArizeClient(LazySubclientsMixin):
|
|
|
182
202
|
lines.append(" }")
|
|
183
203
|
lines.append(")")
|
|
184
204
|
return "\n".join(lines)
|
|
205
|
+
|
|
206
|
+
def clear_cache(self) -> None:
|
|
207
|
+
p = Path(self.sdk_config.cache_dir)
|
|
208
|
+
|
|
209
|
+
if not p.exists():
|
|
210
|
+
logger.warning(
|
|
211
|
+
f"Cache directory does not exist at {p}, nothing to clear"
|
|
212
|
+
)
|
|
213
|
+
if not p.is_dir():
|
|
214
|
+
logger.error(f"Cache path is not a directory: {p}")
|
|
215
|
+
raise NotADirectoryError(f"Not a directory: {p}")
|
|
216
|
+
|
|
217
|
+
logger.info(f"Clearing cache directory at {p}")
|
|
218
|
+
shutil.rmtree(p)
|
|
@@ -3,6 +3,7 @@ import os
|
|
|
3
3
|
import sys
|
|
4
4
|
import threading
|
|
5
5
|
from dataclasses import dataclass, field, fields
|
|
6
|
+
from pathlib import Path
|
|
6
7
|
from typing import Any, Dict
|
|
7
8
|
|
|
8
9
|
from arize.constants.config import (
|
|
@@ -145,6 +146,8 @@ class SDKConfiguration:
|
|
|
145
146
|
api_key: str = field(default_factory=_api_key_factory)
|
|
146
147
|
api_host: str = field(default_factory=_api_host_factory)
|
|
147
148
|
api_scheme: str = field(default_factory=_api_scheme_factory)
|
|
149
|
+
otlp_host: str = field(default_factory=_otlp_host_factory)
|
|
150
|
+
otlp_scheme: str = field(default_factory=_otlp_scheme_factory)
|
|
148
151
|
flight_server_host: str = field(default_factory=_flight_host_factory)
|
|
149
152
|
flight_server_port: int = field(default_factory=_flight_port_factory)
|
|
150
153
|
flight_scheme: str = field(default_factory=_flight_scheme_factory)
|
|
@@ -154,8 +157,6 @@ class SDKConfiguration:
|
|
|
154
157
|
stream_max_queue_bound: int = field(
|
|
155
158
|
default_factory=_stream_max_queue_bound_factory
|
|
156
159
|
)
|
|
157
|
-
otlp_host: str = field(default_factory=_otlp_host_factory)
|
|
158
|
-
otlp_scheme: str = field(default_factory=_otlp_scheme_factory)
|
|
159
160
|
max_http_payload_size_mb: float = field(
|
|
160
161
|
default_factory=_max_http_payload_size_mb_factory
|
|
161
162
|
)
|
|
@@ -174,6 +175,10 @@ class SDKConfiguration:
|
|
|
174
175
|
if not self.api_key:
|
|
175
176
|
raise MissingAPIKeyError()
|
|
176
177
|
|
|
178
|
+
@property
|
|
179
|
+
def cache_dir(self) -> str:
|
|
180
|
+
return str(Path(self.arize_direcory) / "cache")
|
|
181
|
+
|
|
177
182
|
@property
|
|
178
183
|
def api_url(self) -> str:
|
|
179
184
|
return _endpoint(self.api_scheme, self.api_host)
|
|
@@ -25,7 +25,7 @@ logger = logging.getLogger(__name__)
|
|
|
25
25
|
|
|
26
26
|
|
|
27
27
|
class DatasetsClient:
|
|
28
|
-
def __init__(self, sdk_config: SDKConfiguration):
|
|
28
|
+
def __init__(self, *, sdk_config: SDKConfiguration):
|
|
29
29
|
self._sdk_config = sdk_config
|
|
30
30
|
|
|
31
31
|
# Import at runtime so it’s still lazy and extras-gated by the parent
|
|
@@ -45,6 +45,7 @@ class DatasetsClient:
|
|
|
45
45
|
|
|
46
46
|
def _create_dataset(
|
|
47
47
|
self,
|
|
48
|
+
*,
|
|
48
49
|
name: str,
|
|
49
50
|
space_id: str,
|
|
50
51
|
examples: List[Dict[str, Any]] | pd.DataFrame,
|
|
@@ -154,6 +155,7 @@ class DatasetsClient:
|
|
|
154
155
|
|
|
155
156
|
def _list_examples(
|
|
156
157
|
self,
|
|
158
|
+
*,
|
|
157
159
|
dataset_id: str,
|
|
158
160
|
dataset_version_id: str = "",
|
|
159
161
|
limit: int = 100,
|
|
@@ -176,7 +178,7 @@ class DatasetsClient:
|
|
|
176
178
|
# try to load dataset from cache
|
|
177
179
|
if self._sdk_config.enable_caching:
|
|
178
180
|
dataset_df = load_cached_resource(
|
|
179
|
-
cache_dir=self._sdk_config.
|
|
181
|
+
cache_dir=self._sdk_config.cache_dir,
|
|
180
182
|
resource="dataset",
|
|
181
183
|
resource_id=dataset_id,
|
|
182
184
|
resource_updated_at=dataset_updated_at,
|
|
@@ -213,7 +215,7 @@ class DatasetsClient:
|
|
|
213
215
|
|
|
214
216
|
# cache dataset for future use
|
|
215
217
|
cache_resource(
|
|
216
|
-
cache_dir=self._sdk_config.
|
|
218
|
+
cache_dir=self._sdk_config.cache_dir,
|
|
217
219
|
resource="dataset",
|
|
218
220
|
resource_id=dataset_id,
|
|
219
221
|
resource_updated_at=dataset_updated_at,
|
|
@@ -50,7 +50,7 @@ logger = logging.getLogger(__name__)
|
|
|
50
50
|
|
|
51
51
|
|
|
52
52
|
class ExperimentsClient:
|
|
53
|
-
def __init__(self, sdk_config: SDKConfiguration):
|
|
53
|
+
def __init__(self, *, sdk_config: SDKConfiguration):
|
|
54
54
|
self._sdk_config = sdk_config
|
|
55
55
|
from arize._generated import api_client as gen
|
|
56
56
|
|
|
@@ -72,6 +72,7 @@ class ExperimentsClient:
|
|
|
72
72
|
|
|
73
73
|
def _run_experiment(
|
|
74
74
|
self,
|
|
75
|
+
*,
|
|
75
76
|
name: str,
|
|
76
77
|
dataset_id: str,
|
|
77
78
|
task: ExperimentTask,
|
|
@@ -158,7 +159,7 @@ class ExperimentsClient:
|
|
|
158
159
|
# try to load dataset from cache
|
|
159
160
|
if self._sdk_config.enable_caching:
|
|
160
161
|
dataset_df = load_cached_resource(
|
|
161
|
-
cache_dir=self._sdk_config.
|
|
162
|
+
cache_dir=self._sdk_config.cache_dir,
|
|
162
163
|
resource="dataset",
|
|
163
164
|
resource_id=dataset_id,
|
|
164
165
|
resource_updated_at=dataset_updated_at,
|
|
@@ -189,7 +190,7 @@ class ExperimentsClient:
|
|
|
189
190
|
|
|
190
191
|
# cache dataset for future use
|
|
191
192
|
cache_resource(
|
|
192
|
-
cache_dir=self._sdk_config.
|
|
193
|
+
cache_dir=self._sdk_config.cache_dir,
|
|
193
194
|
resource="dataset",
|
|
194
195
|
resource_id=dataset_id,
|
|
195
196
|
resource_updated_at=dataset_updated_at,
|
|
@@ -268,6 +269,7 @@ class ExperimentsClient:
|
|
|
268
269
|
|
|
269
270
|
def _create_experiment(
|
|
270
271
|
self,
|
|
272
|
+
*,
|
|
271
273
|
name: str,
|
|
272
274
|
dataset_id: str,
|
|
273
275
|
experiment_runs: List[Dict[str, Any]] | pd.DataFrame,
|
|
@@ -377,6 +379,7 @@ class ExperimentsClient:
|
|
|
377
379
|
|
|
378
380
|
def _list_runs(
|
|
379
381
|
self,
|
|
382
|
+
*,
|
|
380
383
|
experiment_id: str,
|
|
381
384
|
limit: int = 100,
|
|
382
385
|
all: bool = False,
|
|
@@ -400,7 +403,7 @@ class ExperimentsClient:
|
|
|
400
403
|
# try to load dataset from cache
|
|
401
404
|
if self._sdk_config.enable_caching:
|
|
402
405
|
experiment_df = load_cached_resource(
|
|
403
|
-
cache_dir=self._sdk_config.
|
|
406
|
+
cache_dir=self._sdk_config.cache_dir,
|
|
404
407
|
resource="experiment",
|
|
405
408
|
resource_id=experiment_id,
|
|
406
409
|
resource_updated_at=experiment_updated_at,
|
|
@@ -436,7 +439,7 @@ class ExperimentsClient:
|
|
|
436
439
|
|
|
437
440
|
# cache dataset for future use
|
|
438
441
|
cache_resource(
|
|
439
|
-
cache_dir=self._sdk_config.
|
|
442
|
+
cache_dir=self._sdk_config.cache_dir,
|
|
440
443
|
resource="dataset",
|
|
441
444
|
resource_id=experiment_id,
|
|
442
445
|
resource_updated_at=experiment_updated_at,
|
|
@@ -558,9 +561,3 @@ def _get_tracer_resource(
|
|
|
558
561
|
trace.set_tracer_provider(tracer_provider)
|
|
559
562
|
|
|
560
563
|
return tracer_provider.get_tracer(__name__), resource
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
def _dataset_cache_key(dataset_id: str, dataset_updated_at: str | None) -> str:
|
|
564
|
-
# include updated_at if present to produce a new key when dataset changes
|
|
565
|
-
key_src = f"{dataset_id}:{dataset_updated_at or ''}"
|
|
566
|
-
return hashlib.sha256(key_src.encode("utf-8")).hexdigest()
|
|
@@ -96,7 +96,7 @@ _MIMIC_EXTRA = "mimic-explainer"
|
|
|
96
96
|
|
|
97
97
|
|
|
98
98
|
class MLModelsClient:
|
|
99
|
-
def __init__(self, sdk_config: SDKConfiguration):
|
|
99
|
+
def __init__(self, *, sdk_config: SDKConfiguration):
|
|
100
100
|
self._sdk_config = sdk_config
|
|
101
101
|
|
|
102
102
|
# internal cache for the futures session
|
|
@@ -104,6 +104,7 @@ class MLModelsClient:
|
|
|
104
104
|
|
|
105
105
|
def log_stream(
|
|
106
106
|
self,
|
|
107
|
+
*,
|
|
107
108
|
space_id: str,
|
|
108
109
|
model_name: str,
|
|
109
110
|
model_type: ModelTypes,
|
|
@@ -455,6 +456,7 @@ class MLModelsClient:
|
|
|
455
456
|
# TODO(Kiko): Handle sync argument
|
|
456
457
|
def log_batch(
|
|
457
458
|
self,
|
|
459
|
+
*,
|
|
458
460
|
space_id: str,
|
|
459
461
|
model_name: str,
|
|
460
462
|
model_type: ModelTypes,
|
|
@@ -666,6 +668,7 @@ class MLModelsClient:
|
|
|
666
668
|
|
|
667
669
|
def export_to_df(
|
|
668
670
|
self,
|
|
671
|
+
*,
|
|
669
672
|
space_id: str,
|
|
670
673
|
model_name: str,
|
|
671
674
|
environment: Environments,
|
|
@@ -711,6 +714,7 @@ class MLModelsClient:
|
|
|
711
714
|
|
|
712
715
|
def export_to_parquet(
|
|
713
716
|
self,
|
|
717
|
+
*,
|
|
714
718
|
space_id: str,
|
|
715
719
|
model_name: str,
|
|
716
720
|
environment: Environments,
|
|
@@ -47,11 +47,12 @@ logger = logging.getLogger(__name__)
|
|
|
47
47
|
|
|
48
48
|
|
|
49
49
|
class SpansClient:
|
|
50
|
-
def __init__(self, sdk_config: SDKConfiguration):
|
|
50
|
+
def __init__(self, *, sdk_config: SDKConfiguration):
|
|
51
51
|
self._sdk_config = sdk_config
|
|
52
52
|
|
|
53
53
|
def log(
|
|
54
54
|
self,
|
|
55
|
+
*,
|
|
55
56
|
space_id: str,
|
|
56
57
|
project_name: str,
|
|
57
58
|
dataframe: pd.DataFrame,
|
|
@@ -253,6 +254,7 @@ class SpansClient:
|
|
|
253
254
|
|
|
254
255
|
def update_evaluations(
|
|
255
256
|
self,
|
|
257
|
+
*,
|
|
256
258
|
space_id: str,
|
|
257
259
|
project_name: str,
|
|
258
260
|
dataframe: pd.DataFrame,
|
|
@@ -430,6 +432,7 @@ class SpansClient:
|
|
|
430
432
|
|
|
431
433
|
def update_annotations(
|
|
432
434
|
self,
|
|
435
|
+
*,
|
|
433
436
|
space_id: str,
|
|
434
437
|
project_name: str,
|
|
435
438
|
dataframe: pd.DataFrame,
|
|
@@ -645,6 +648,7 @@ class SpansClient:
|
|
|
645
648
|
|
|
646
649
|
def update_metadata(
|
|
647
650
|
self,
|
|
651
|
+
*,
|
|
648
652
|
space_id: str,
|
|
649
653
|
project_name: str,
|
|
650
654
|
dataframe: pd.DataFrame,
|
|
@@ -977,6 +981,7 @@ class SpansClient:
|
|
|
977
981
|
|
|
978
982
|
def export_to_df(
|
|
979
983
|
self,
|
|
984
|
+
*,
|
|
980
985
|
space_id: str,
|
|
981
986
|
project_name: str,
|
|
982
987
|
start_time: datetime,
|
|
@@ -1011,6 +1016,7 @@ class SpansClient:
|
|
|
1011
1016
|
|
|
1012
1017
|
def export_to_parquet(
|
|
1013
1018
|
self,
|
|
1019
|
+
*,
|
|
1014
1020
|
space_id: str,
|
|
1015
1021
|
project_name: str,
|
|
1016
1022
|
start_time: datetime,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "8.0.0a19"
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "8.0.0a18"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{arize-8.0.0a18 → arize-8.0.0a19}/src/arize/_generated/api_client/models/datasets_create_request.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{arize-8.0.0a18 → arize-8.0.0a19}/src/arize/_generated/api_client/test/test_dataset_version.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{arize-8.0.0a18 → arize-8.0.0a19}/src/arize/_generated/api_client/test/test_experiments_api.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{arize-8.0.0a18 → arize-8.0.0a19}/src/arize/spans/validation/annotations/annotations_validation.py
RENAMED
|
File without changes
|
|
File without changes
|
{arize-8.0.0a18 → arize-8.0.0a19}/src/arize/spans/validation/annotations/value_validation.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{arize-8.0.0a18 → arize-8.0.0a19}/src/arize/spans/validation/common/dataframe_form_validation.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{arize-8.0.0a18 → arize-8.0.0a19}/src/arize/spans/validation/evals/dataframe_form_validation.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{arize-8.0.0a18 → arize-8.0.0a19}/src/arize/spans/validation/metadata/argument_validation.py
RENAMED
|
File without changes
|
{arize-8.0.0a18 → arize-8.0.0a19}/src/arize/spans/validation/metadata/dataframe_form_validation.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{arize-8.0.0a18 → arize-8.0.0a19}/src/arize/spans/validation/spans/dataframe_form_validation.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|