arize 8.0.0a7__py3-none-any.whl → 8.0.0a9__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.
@@ -1,8 +1,9 @@
1
- from __future__ import annotations
2
-
3
1
  import json
4
2
  import logging
5
- from typing import TYPE_CHECKING, List
3
+ from typing import List
4
+
5
+ import numpy as np
6
+ import pandas as pd
6
7
 
7
8
  from arize.spans.columns import (
8
9
  SPAN_ATTRIBUTES_EMBEDDING_EMBEDDINGS_COL,
@@ -18,10 +19,6 @@ from arize.spans.columns import (
18
19
  SPAN_START_TIME_COL,
19
20
  )
20
21
 
21
- if TYPE_CHECKING:
22
- import numpy as np
23
- import pandas as pd
24
-
25
22
  logger = logging.getLogger(__name__)
26
23
 
27
24
 
arize/_flight/client.py CHANGED
@@ -9,6 +9,7 @@ from typing import TYPE_CHECKING, Any, Dict, List, Tuple
9
9
  from google.protobuf import json_format
10
10
  from pyarrow import flight
11
11
 
12
+ from arize._flight.types import FlightRequestType
12
13
  from arize._generated.protocol.flight.ingest_pb2 import (
13
14
  WriteSpanAnnotationResponse,
14
15
  WriteSpanAttributesMetadataResponse,
@@ -22,7 +23,6 @@ from arize.version import __version__
22
23
  if TYPE_CHECKING:
23
24
  import pyarrow as pa
24
25
 
25
- from arize._flight.client import FlightRequestType
26
26
 
27
27
  BytesPair = Tuple[bytes, bytes]
28
28
  Headers = List[BytesPair]
arize/client.py CHANGED
@@ -65,6 +65,7 @@ class ArizeClient(LazySubclientsMixin):
65
65
  "opentelemetry",
66
66
  "pandas",
67
67
  "pyarrow",
68
+ "requests",
68
69
  "tqdm",
69
70
  ),
70
71
  ),
arize/models/client.py CHANGED
@@ -52,7 +52,6 @@ from arize.types import (
52
52
  is_list_of,
53
53
  )
54
54
  from arize.utils.casting import cast_dictionary, cast_typed_columns
55
- from arize.utils.dataframe import remove_extraneous_columns
56
55
 
57
56
  if TYPE_CHECKING:
58
57
  import concurrent.futures as cf
@@ -75,8 +74,9 @@ _STREAM_EXTRA = "ml-stream"
75
74
 
76
75
  _BATCH_DEPS = (
77
76
  "pandas",
78
- "pyarrow",
79
77
  "google.protobuf",
78
+ "pyarrow",
79
+ "requests",
80
80
  "tqdm",
81
81
  )
82
82
  _BATCH_EXTRA = "ml-batch"
@@ -464,6 +464,7 @@ class MLModelsClient:
464
464
 
465
465
  from arize.models.batch_validation.validator import Validator
466
466
  from arize.utils.arrow import post_arrow_table
467
+ from arize.utils.dataframe import remove_extraneous_columns
467
468
  from arize.utils.proto import get_pb_schema, get_pb_schema_corpus
468
469
 
469
470
  # This method requires a space_id and project_name
@@ -1,13 +1,10 @@
1
- from __future__ import annotations
1
+ from typing import Any, List
2
2
 
3
- from typing import TYPE_CHECKING, Any, List
3
+ import pandas as pd
4
4
 
5
5
  from arize.exceptions.base import InvalidFieldTypeConversion
6
6
  from arize.spans.validation.common.errors import InvalidTypeArgument
7
7
 
8
- if TYPE_CHECKING:
9
- import pandas as pd
10
-
11
8
 
12
9
  def check_field_convertible_to_str(
13
10
  project_name: Any,
@@ -1,12 +1,9 @@
1
- from __future__ import annotations
1
+ from typing import List
2
2
 
3
- from typing import TYPE_CHECKING, List
3
+ import pandas as pd
4
4
 
5
5
  from arize.exceptions.base import ValidationError
6
6
 
7
- if TYPE_CHECKING:
8
- import pandas as pd
9
-
10
7
 
11
8
  class MetadataArgumentError(ValidationError):
12
9
  def __init__(self, message: str, resolution: str) -> None:
arize/utils/arrow.py CHANGED
@@ -8,11 +8,12 @@ import tempfile
8
8
  from typing import TYPE_CHECKING, Any, Dict
9
9
 
10
10
  import pyarrow as pa
11
- import requests
12
11
 
13
12
  from arize.logging import get_arize_project_url, log_a_list
14
13
 
15
14
  if TYPE_CHECKING:
15
+ import requests
16
+
16
17
  from arize._generated.protocol.rec import public_pb2 as pb2
17
18
 
18
19
  logger = logging.getLogger(__name__)
@@ -27,6 +28,9 @@ def post_arrow_table(
27
28
  verify: bool,
28
29
  tmp_dir: str = "",
29
30
  ) -> requests.Response:
31
+ # We import here to avoid depending onn requests for all arrow utils
32
+ import requests
33
+
30
34
  logger.debug("Preparing to log Arrow table via file upload")
31
35
  logger.debug(
32
36
  "Preparing to log Arrow table via file upload",
@@ -71,15 +75,17 @@ def post_arrow_table(
71
75
  "Uploading file to Arize",
72
76
  extra={"path": outfile, "size_bytes": _filesize(outfile)},
73
77
  )
74
- resp = _post_file(
75
- files_url=files_url,
76
- path=outfile,
77
- headers=headers,
78
- timeout=timeout,
79
- verify=verify,
80
- )
81
- _maybe_log_project_url(resp)
82
- return resp
78
+ # Post file
79
+ with open(outfile, "rb") as f:
80
+ resp = requests.post(
81
+ files_url,
82
+ timeout=timeout,
83
+ data=f,
84
+ headers=headers,
85
+ verify=verify,
86
+ )
87
+ _maybe_log_project_url(resp)
88
+ return resp
83
89
  finally:
84
90
  if tdir is not None:
85
91
  try:
@@ -98,23 +104,6 @@ def post_arrow_table(
98
104
  )
99
105
 
100
106
 
101
- def _post_file(
102
- files_url: str,
103
- path: str,
104
- headers: Dict[str, str],
105
- timeout: float | None,
106
- verify: bool,
107
- ) -> requests.Response:
108
- with open(path, "rb") as f:
109
- return requests.post(
110
- files_url,
111
- timeout=timeout,
112
- data=f,
113
- headers=headers,
114
- verify=verify,
115
- )
116
-
117
-
118
107
  def append_to_pyarrow_metadata(
119
108
  pa_schema: pa.Schema, new_metadata: Dict[str, Any]
120
109
  ):
arize/version.py CHANGED
@@ -1 +1 @@
1
- __version__ = "8.0.0a7"
1
+ __version__ = "8.0.0a9"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: arize
3
- Version: 8.0.0a7
3
+ Version: 8.0.0a9
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
@@ -34,6 +34,7 @@ Provides-Extra: ml-batch
34
34
  Requires-Dist: pandas<3,>=1.0.0; extra == 'ml-batch'
35
35
  Requires-Dist: protobuf<6,>=4.21.0; extra == 'ml-batch'
36
36
  Requires-Dist: pyarrow>=0.15.0; extra == 'ml-batch'
37
+ Requires-Dist: requests<3,>=2.0.0; extra == 'ml-batch'
37
38
  Requires-Dist: tqdm; extra == 'ml-batch'
38
39
  Provides-Extra: ml-stream
39
40
  Requires-Dist: protobuf<6,>=4.21.0; extra == 'ml-stream'
@@ -44,6 +45,7 @@ Requires-Dist: opentelemetry-semantic-conventions<1,>=0.43b0; extra == 'spans'
44
45
  Requires-Dist: pandas<3,>=1.0.0; extra == 'spans'
45
46
  Requires-Dist: protobuf<6,>=4.21.0; extra == 'spans'
46
47
  Requires-Dist: pyarrow>=0.15.0; extra == 'spans'
48
+ Requires-Dist: requests<3,>=2.0.0; extra == 'spans'
47
49
  Requires-Dist: tqdm; extra == 'spans'
48
50
  Description-Content-Type: text/markdown
49
51
 
@@ -1,17 +1,17 @@
1
1
  arize/__init__.py,sha256=-4bbbZwcjGS9OfAunsB-lmKRCzccPdFvZmvJQJEky3E,534
2
2
  arize/_lazy.py,sha256=MVep6D93sJWvArg4pgm4CVNGc6tu-XRK_Z7EDMuc76I,2358
3
- arize/client.py,sha256=ntSYQSzM6MrvcYDxV-lFF-yoxoPjjCvBHKoN-2k1BGg,5688
3
+ arize/client.py,sha256=0LtZU3WeEatGd1QgQsMrJOuI-tFmzM3y1AfO74BLJys,5716
4
4
  arize/config.py,sha256=iynVEZhrOPdTNJTQ_KQmwKOPiwL0LfEP8AUIDYW86Xw,5801
5
5
  arize/logging.py,sha256=2vwdta2-kR78GeBFGK2vpk51rQ2d06HoKzuARI9qFQk,7317
6
6
  arize/types.py,sha256=z1yg5-brmTD4kVHDmmTVkYke53JpusXXeOOpdQw7rYg,69508
7
- arize/version.py,sha256=QcLp83_rc-TQ4KtJaloeQDRJflEN04D3voc6Lf15giw,24
7
+ arize/version.py,sha256=BDT_fj8aJ4pvQMjTUrdbEd6vY71GkAguJScCzty97gA,24
8
8
  arize/_exporter/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
9
9
  arize/_exporter/client.py,sha256=eAxJX1sUfdpLrtaQ0ynMTd5jI37JOp9fbl3NWp4WFEA,15216
10
10
  arize/_exporter/validation.py,sha256=6ROu5p7uaolxQ93lO_Eiwv9NVw_uyi3E5T--C5Klo5Q,1021
11
11
  arize/_exporter/parsers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
12
- arize/_exporter/parsers/tracing_data_parser.py,sha256=1ZSYVlrpYYkewg-1QWxwR5aZMX8oglw1wq7kJlh0SkI,5472
12
+ arize/_exporter/parsers/tracing_data_parser.py,sha256=zVS-w8t1HJkz-AIC_JCdjPJ7gJXgFpfELfqNM_vK42E,5395
13
13
  arize/_flight/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
14
- arize/_flight/client.py,sha256=aJzN584nlCPgPtGIh6BFYRogB6TvSlhRRmQcDdTehCY,6900
14
+ arize/_flight/client.py,sha256=OCqMf0SEclc2TLzMqu3wgORuLHHGkZOODDZsUu8F8a0,6895
15
15
  arize/_flight/types.py,sha256=OuLupzkGYt7r0PEzsX4NmXV9uq3lD11AeRaHHI5NsSw,146
16
16
  arize/_generated/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
17
17
  arize/_generated/api_client_README.md,sha256=AM6a2RwMFfDPPt1nCFC-SYW0T4vNAwNfId9FYcPFjMM,4844
@@ -71,7 +71,7 @@ arize/experiments/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU
71
71
  arize/experiments/client.py,sha256=2fDq0fr_h6Knn_9zgDAlAhSUCKUrKozGLOQRTInCr4c,344
72
72
  arize/models/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
73
73
  arize/models/bounded_executor.py,sha256=o-PJsDAXQdiJ9dc-jzGCHMhT0-QBY9bvl4Ckn1017Eo,1131
74
- arize/models/client.py,sha256=zGk4NGOFskQn5tLOrN9OiAF0UmfE03PpSGez5qmt5ic,31395
74
+ arize/models/client.py,sha256=aYXPv5Pq2Va2_aEEptw6-iD5zDEFV4UJz2bPnXvvIHw,31419
75
75
  arize/models/stream_validation.py,sha256=PtmqWgRdCxVtTNkHHEHIM1S6ECbYLA1vuQQFBw_t3Lw,7118
76
76
  arize/models/batch_validation/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
77
77
  arize/models/batch_validation/errors.py,sha256=__I8l25zf4kGv6qgiwEm9LzGNgqmMSM8Fb88pBtyMxE,39990
@@ -86,7 +86,7 @@ arize/spans/validation/annotations/annotations_validation.py,sha256=fWoLFo98CPSz
86
86
  arize/spans/validation/annotations/dataframe_form_validation.py,sha256=wrYd81ZT5MxzbXqNUqq-m1NGC-rT7upoDqIBzycvfi8,7028
87
87
  arize/spans/validation/annotations/value_validation.py,sha256=Xk97D0ymV8KoMP8Zr9vqVq6Clwf8MMN1IfbcAt5W80s,7655
88
88
  arize/spans/validation/common/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
89
- arize/spans/validation/common/argument_validation.py,sha256=m5UVtYbX39-VRemJe2pv50RgaBoLjoD-HLFN-Tz6pM0,1542
89
+ arize/spans/validation/common/argument_validation.py,sha256=VvR1xQLHcSOFeCAaNhAbYgtUIvbHd_NK5RlES0I7OZ8,1469
90
90
  arize/spans/validation/common/dataframe_form_validation.py,sha256=g9BUyIJYdEx2Uf-pkRxeaAdY-u1lWzYdxB5-N8yPoCE,1294
91
91
  arize/spans/validation/common/errors.py,sha256=iZTZKy-Me8BtOFIzNg9gjg7UqRRkBGPnFsC_ZhUeDNQ,13478
92
92
  arize/spans/validation/common/value_validation.py,sha256=s0mZAoHhg6iT5lNF5EcWn5Z0ERr_b-62GOIDT1y1awE,6968
@@ -95,7 +95,7 @@ arize/spans/validation/evals/dataframe_form_validation.py,sha256=LAcWQ23Fb3XbYTS
95
95
  arize/spans/validation/evals/evals_validation.py,sha256=GVFkgJ4VmvIfPuiLleQZhGjd-CHfXbjGwDjqon4Qhbc,2268
96
96
  arize/spans/validation/evals/value_validation.py,sha256=h7Rss51asFgwhCAVlJ4WHYgyt1DCT-FW_AtLqy4uMig,3305
97
97
  arize/spans/validation/metadata/__init__.py,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
98
- arize/spans/validation/metadata/argument_validation.py,sha256=CHpPqMp7ipdwuv0O1tOIJmOu0PT6eAh_ws3TXvjq6Vk,1552
98
+ arize/spans/validation/metadata/argument_validation.py,sha256=vsVbmg1ZC2DpbaWtMpU1fnEQy7ik1Vdjo8Au4THgqDE,1479
99
99
  arize/spans/validation/metadata/dataframe_form_validation.py,sha256=E5gXq9SmDXigUHMaTSCInWlsF-GZxIRQz-GvoH_zWRo,3441
100
100
  arize/spans/validation/metadata/value_validation.py,sha256=1DFshKQhy7jwA97tRlvwnnEsUbd1-tfmcWgG6cZO1uQ,9741
101
101
  arize/spans/validation/spans/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -103,11 +103,11 @@ arize/spans/validation/spans/dataframe_form_validation.py,sha256=NqyaOYzZL5_XIHR
103
103
  arize/spans/validation/spans/spans_validation.py,sha256=p6IjbQMtOhotGBfw3axj7yMWxb2pC47EAzJSB887nzs,2451
104
104
  arize/spans/validation/spans/value_validation.py,sha256=H3qV96w6JQNCed_MxhWDas9Jf6vUj6RFabShcwf4jr4,19102
105
105
  arize/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
106
- arize/utils/arrow.py,sha256=Tb4HQiiFBScYA3MtrhB4ppuHqRxToQ0-rkixZ59cVa0,5447
106
+ arize/utils/arrow.py,sha256=4In1gQc0i4Rb8zuwI0w-Hv-10wiItu5opqqGrJ8tSzo,5277
107
107
  arize/utils/casting.py,sha256=KUrPUQN6qJEVe39nxbr0T-0GjAJLHjf4xWuzV71QezI,12468
108
108
  arize/utils/dataframe.py,sha256=I0FloPgNiqlKga32tMOvTE70598QA8Hhrgf-6zjYMAM,1120
109
109
  arize/utils/proto.py,sha256=9vLo53INYjdF78ffjm3E48jFwK6LbPD2FfKei7VaDy8,35477
110
- arize-8.0.0a7.dist-info/METADATA,sha256=sAC-xW3yGRagFYnCnnmjg5dKd5jb-JSlTbx0hNddF4E,12346
111
- arize-8.0.0a7.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
112
- arize-8.0.0a7.dist-info/licenses/LICENSE.md,sha256=8vLN8Gms62NCBorxIv9MUvuK7myueb6_-dhXHPmm4H0,1479
113
- arize-8.0.0a7.dist-info/RECORD,,
110
+ arize-8.0.0a9.dist-info/METADATA,sha256=WGsj9jvMjlNY9Xy4c9GpIT6mkJ1551ITCUYEhhQESck,12453
111
+ arize-8.0.0a9.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
112
+ arize-8.0.0a9.dist-info/licenses/LICENSE.md,sha256=8vLN8Gms62NCBorxIv9MUvuK7myueb6_-dhXHPmm4H0,1479
113
+ arize-8.0.0a9.dist-info/RECORD,,