arize-phoenix 8.0.1__py3-none-any.whl → 8.1.0__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.
Potentially problematic release.
This version of arize-phoenix might be problematic. Click here for more details.
- {arize_phoenix-8.0.1.dist-info → arize_phoenix-8.1.0.dist-info}/METADATA +1 -2
- {arize_phoenix-8.0.1.dist-info → arize_phoenix-8.1.0.dist-info}/RECORD +8 -9
- phoenix/config.py +32 -6
- phoenix/version.py +1 -1
- phoenix/server/api/helpers/jsonschema.py +0 -135
- {arize_phoenix-8.0.1.dist-info → arize_phoenix-8.1.0.dist-info}/WHEEL +0 -0
- {arize_phoenix-8.0.1.dist-info → arize_phoenix-8.1.0.dist-info}/entry_points.txt +0 -0
- {arize_phoenix-8.0.1.dist-info → arize_phoenix-8.1.0.dist-info}/licenses/IP_NOTICE +0 -0
- {arize_phoenix-8.0.1.dist-info → arize_phoenix-8.1.0.dist-info}/licenses/LICENSE +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: arize-phoenix
|
|
3
|
-
Version: 8.0
|
|
3
|
+
Version: 8.1.0
|
|
4
4
|
Summary: AI Observability and Evaluation
|
|
5
5
|
Project-URL: Documentation, https://docs.arize.com/phoenix/
|
|
6
6
|
Project-URL: Issues, https://github.com/Arize-ai/phoenix/issues
|
|
@@ -30,7 +30,6 @@ Requires-Dist: grpc-interceptor
|
|
|
30
30
|
Requires-Dist: grpcio
|
|
31
31
|
Requires-Dist: httpx
|
|
32
32
|
Requires-Dist: jinja2
|
|
33
|
-
Requires-Dist: jsonschema<=4.23.0,>=4.0.0
|
|
34
33
|
Requires-Dist: numpy!=2.0.0
|
|
35
34
|
Requires-Dist: openinference-instrumentation>=0.1.12
|
|
36
35
|
Requires-Dist: openinference-semantic-conventions>=0.1.12
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
phoenix/__init__.py,sha256=X3eUEwd2rG8KKWWYVNNDJoqo08ihfjgHhlP29dcdNJE,5481
|
|
2
2
|
phoenix/auth.py,sha256=VVMHrWN31tln3Zo4z6ofecrV4daiqJjLd8r85mqlxek,10939
|
|
3
|
-
phoenix/config.py,sha256=
|
|
3
|
+
phoenix/config.py,sha256=uGAIiD0dEdUybvCGNeO6TsL12BJl09vjGuXcWjnuPUA,28049
|
|
4
4
|
phoenix/datetime_utils.py,sha256=iJzNG6YJ6V7_u8B2iA7P2Z26FyxYbOPtx0dhJ7kNDHA,3398
|
|
5
5
|
phoenix/exceptions.py,sha256=n2L2KKuecrdflB9MsCdAYCiSEvGJptIsfRkXMoJle7A,169
|
|
6
6
|
phoenix/py.typed,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
|
|
7
7
|
phoenix/services.py,sha256=kpW1WL0kiB8XJsO6XycvZVJ-lBkNoenhQ7atCvBoSe8,5365
|
|
8
8
|
phoenix/settings.py,sha256=ht-0oN-sMV6SPXrk7Tu1EZlngpAYkGNLYPhO8DyrdQI,661
|
|
9
|
-
phoenix/version.py,sha256=
|
|
9
|
+
phoenix/version.py,sha256=c04nFsyfS0zYoDvZjLO-uEi12TFB5EWSD6fiWiI7OLQ,22
|
|
10
10
|
phoenix/core/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
11
11
|
phoenix/core/embedding_dimension.py,sha256=zKGbcvwOXgLf-yrJBpQyKtd-LEOPRKHnUToyAU8Owis,87
|
|
12
12
|
phoenix/core/model.py,sha256=qBFraOtmwCCnWJltKNP18DDG0mULXigytlFsa6YOz6k,4837
|
|
@@ -140,7 +140,6 @@ phoenix/server/api/dataloaders/cache/two_tier_cache.py,sha256=cmo8FUT3E91R139IEz
|
|
|
140
140
|
phoenix/server/api/helpers/__init__.py,sha256=m2-xaSPqUiSs91k62JaRDjFNfl-1byxBfY-m_Vxw16U,272
|
|
141
141
|
phoenix/server/api/helpers/dataset_helpers.py,sha256=DoMBTg-qXTnC_K4Evx1WKpCCYgRbITpVqyY-8efJRf0,8984
|
|
142
142
|
phoenix/server/api/helpers/experiment_run_filters.py,sha256=DOnVwrmn39eAkk2mwuZP8kIcAnR5jrOgllEwWSjsw94,29893
|
|
143
|
-
phoenix/server/api/helpers/jsonschema.py,sha256=J6C3Dlf7KTJ1rW6vvhnkB7NNPh2KonwE_0WMP9WKEV0,5470
|
|
144
143
|
phoenix/server/api/helpers/playground_clients.py,sha256=NIRyKp61OLLZ-UOUUitM8zCh2Xg8bep4qXxSLwEb3XU,39804
|
|
145
144
|
phoenix/server/api/helpers/playground_registry.py,sha256=CPLMziFB2wmr-dfbx7VbzO2f8YIG_k5RftzvGXYGQ1w,2570
|
|
146
145
|
phoenix/server/api/helpers/playground_spans.py,sha256=PjGNDc7cpqn5lmRM6TO_J1eVRGlgsNdQ8IT--5JVz0o,16881
|
|
@@ -360,9 +359,9 @@ phoenix/utilities/project.py,sha256=auVpARXkDb-JgeX5f2aStyFIkeKvGwN9l7qrFeJMVxI,
|
|
|
360
359
|
phoenix/utilities/re.py,sha256=6YyUWIkv0zc2SigsxfOWIHzdpjKA_TZo2iqKq7zJKvw,2081
|
|
361
360
|
phoenix/utilities/span_store.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
362
361
|
phoenix/utilities/template_formatters.py,sha256=gh9PJD6WEGw7TEYXfSst1UR4pWWwmjxMLrDVQ_CkpkQ,2779
|
|
363
|
-
arize_phoenix-8.0.
|
|
364
|
-
arize_phoenix-8.0.
|
|
365
|
-
arize_phoenix-8.0.
|
|
366
|
-
arize_phoenix-8.0.
|
|
367
|
-
arize_phoenix-8.0.
|
|
368
|
-
arize_phoenix-8.0.
|
|
362
|
+
arize_phoenix-8.1.0.dist-info/METADATA,sha256=kX65Ch5ML6Yfm2nHtpVG6tpNXLN7M6Lcyq_-Fo2BSek,23425
|
|
363
|
+
arize_phoenix-8.1.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
364
|
+
arize_phoenix-8.1.0.dist-info/entry_points.txt,sha256=Pgpn8Upxx9P8z8joPXZWl2LlnAlGc3gcQoVchb06X1Q,94
|
|
365
|
+
arize_phoenix-8.1.0.dist-info/licenses/IP_NOTICE,sha256=JBqyyCYYxGDfzQ0TtsQgjts41IJoa-hiwDrBjCb9gHM,469
|
|
366
|
+
arize_phoenix-8.1.0.dist-info/licenses/LICENSE,sha256=HFkW9REuMOkvKRACuwLPT0hRydHb3zNg-fdFt94td18,3794
|
|
367
|
+
arize_phoenix-8.1.0.dist-info/RECORD,,
|
phoenix/config.py
CHANGED
|
@@ -8,7 +8,7 @@ from enum import Enum
|
|
|
8
8
|
from importlib.metadata import version
|
|
9
9
|
from pathlib import Path
|
|
10
10
|
from typing import Optional, cast, overload
|
|
11
|
-
from urllib.parse import urlparse
|
|
11
|
+
from urllib.parse import quote_plus, urlparse
|
|
12
12
|
|
|
13
13
|
from phoenix.utilities.logging import log_a_list
|
|
14
14
|
|
|
@@ -624,11 +624,37 @@ def get_env_project_name() -> str:
|
|
|
624
624
|
|
|
625
625
|
|
|
626
626
|
def get_env_database_connection_str() -> str:
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
627
|
+
if phoenix_url := os.getenv(ENV_PHOENIX_SQL_DATABASE_URL):
|
|
628
|
+
return phoenix_url
|
|
629
|
+
|
|
630
|
+
if postgres_url := get_env_postgres_connection_str():
|
|
631
|
+
return postgres_url
|
|
632
|
+
|
|
633
|
+
working_dir = get_working_dir()
|
|
634
|
+
return f"sqlite:///{working_dir}/phoenix.db"
|
|
635
|
+
|
|
636
|
+
|
|
637
|
+
def get_env_postgres_connection_str() -> Optional[str]:
|
|
638
|
+
pg_user = os.getenv("PHOENIX_POSTGRES_USER")
|
|
639
|
+
pg_password = os.getenv("PHOENIX_POSTGRES_PASSWORD")
|
|
640
|
+
pg_host = os.getenv("PHOENIX_POSTGRES_HOST")
|
|
641
|
+
pg_port = os.getenv("PHOENIX_POSTGRES_PORT")
|
|
642
|
+
pg_db = os.getenv("PHOENIX_POSTGRES_DB")
|
|
643
|
+
|
|
644
|
+
if pg_host and ":" in pg_host:
|
|
645
|
+
pg_host, parsed_port = pg_host.split(":")
|
|
646
|
+
pg_port = pg_port or parsed_port # use the explicitly set port if provided
|
|
647
|
+
|
|
648
|
+
if pg_host and pg_user and pg_password:
|
|
649
|
+
encoded_password = quote_plus(pg_password)
|
|
650
|
+
connection_str = f"postgresql://{pg_user}:{encoded_password}@{pg_host}"
|
|
651
|
+
if pg_port:
|
|
652
|
+
connection_str = f"{connection_str}:{pg_port}"
|
|
653
|
+
if pg_db:
|
|
654
|
+
connection_str = f"{connection_str}/{pg_db}"
|
|
655
|
+
|
|
656
|
+
return connection_str
|
|
657
|
+
return None
|
|
632
658
|
|
|
633
659
|
|
|
634
660
|
def get_env_database_schema() -> Optional[str]:
|
phoenix/version.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
__version__ = "8.0
|
|
1
|
+
__version__ = "8.1.0"
|
|
@@ -1,135 +0,0 @@
|
|
|
1
|
-
from typing import Annotated, Any, Literal, Union
|
|
2
|
-
|
|
3
|
-
from jsonschema import Draft7Validator, ValidationError
|
|
4
|
-
from pydantic import AfterValidator, BaseModel, Field
|
|
5
|
-
from typing_extensions import TypeAlias
|
|
6
|
-
|
|
7
|
-
# This meta-schema describes valid JSON schemas according to the JSON Schema Draft 7 specification.
|
|
8
|
-
# It is copied from https://json-schema.org/draft-07/schema#
|
|
9
|
-
JSON_SCHEMA_DRAFT_7_META_SCHEMA = {
|
|
10
|
-
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
11
|
-
"$id": "http://json-schema.org/draft-07/schema#",
|
|
12
|
-
"title": "Core schema meta-schema",
|
|
13
|
-
"definitions": {
|
|
14
|
-
"schemaArray": {"type": "array", "minItems": 1, "items": {"$ref": "#"}},
|
|
15
|
-
"nonNegativeInteger": {"type": "integer", "minimum": 0},
|
|
16
|
-
"nonNegativeIntegerDefault0": {
|
|
17
|
-
"allOf": [{"$ref": "#/definitions/nonNegativeInteger"}, {"default": 0}]
|
|
18
|
-
},
|
|
19
|
-
"simpleTypes": {
|
|
20
|
-
"enum": ["array", "boolean", "integer", "null", "number", "object", "string"]
|
|
21
|
-
},
|
|
22
|
-
"stringArray": {
|
|
23
|
-
"type": "array",
|
|
24
|
-
"items": {"type": "string"},
|
|
25
|
-
"uniqueItems": True,
|
|
26
|
-
"default": [],
|
|
27
|
-
},
|
|
28
|
-
},
|
|
29
|
-
"type": ["object", "boolean"],
|
|
30
|
-
"properties": {
|
|
31
|
-
"$id": {"type": "string", "format": "uri-reference"},
|
|
32
|
-
"$schema": {"type": "string", "format": "uri"},
|
|
33
|
-
"$ref": {"type": "string", "format": "uri-reference"},
|
|
34
|
-
"$comment": {"type": "string"},
|
|
35
|
-
"title": {"type": "string"},
|
|
36
|
-
"description": {"type": "string"},
|
|
37
|
-
"default": True,
|
|
38
|
-
"readOnly": {"type": "boolean", "default": False},
|
|
39
|
-
"writeOnly": {"type": "boolean", "default": False},
|
|
40
|
-
"examples": {"type": "array", "items": True},
|
|
41
|
-
"multipleOf": {"type": "number", "exclusiveMinimum": 0},
|
|
42
|
-
"maximum": {"type": "number"},
|
|
43
|
-
"exclusiveMaximum": {"type": "number"},
|
|
44
|
-
"minimum": {"type": "number"},
|
|
45
|
-
"exclusiveMinimum": {"type": "number"},
|
|
46
|
-
"maxLength": {"$ref": "#/definitions/nonNegativeInteger"},
|
|
47
|
-
"minLength": {"$ref": "#/definitions/nonNegativeIntegerDefault0"},
|
|
48
|
-
"pattern": {"type": "string", "format": "regex"},
|
|
49
|
-
"additionalItems": {"$ref": "#"},
|
|
50
|
-
"items": {"anyOf": [{"$ref": "#"}, {"$ref": "#/definitions/schemaArray"}], "default": True},
|
|
51
|
-
"maxItems": {"$ref": "#/definitions/nonNegativeInteger"},
|
|
52
|
-
"minItems": {"$ref": "#/definitions/nonNegativeIntegerDefault0"},
|
|
53
|
-
"uniqueItems": {"type": "boolean", "default": False},
|
|
54
|
-
"contains": {"$ref": "#"},
|
|
55
|
-
"maxProperties": {"$ref": "#/definitions/nonNegativeInteger"},
|
|
56
|
-
"minProperties": {"$ref": "#/definitions/nonNegativeIntegerDefault0"},
|
|
57
|
-
"required": {"$ref": "#/definitions/stringArray"},
|
|
58
|
-
"additionalProperties": {"$ref": "#"},
|
|
59
|
-
"definitions": {"type": "object", "additionalProperties": {"$ref": "#"}, "default": {}},
|
|
60
|
-
"properties": {"type": "object", "additionalProperties": {"$ref": "#"}, "default": {}},
|
|
61
|
-
"patternProperties": {
|
|
62
|
-
"type": "object",
|
|
63
|
-
"additionalProperties": {"$ref": "#"},
|
|
64
|
-
"propertyNames": {"format": "regex"},
|
|
65
|
-
"default": {},
|
|
66
|
-
},
|
|
67
|
-
"dependencies": {
|
|
68
|
-
"type": "object",
|
|
69
|
-
"additionalProperties": {
|
|
70
|
-
"anyOf": [{"$ref": "#"}, {"$ref": "#/definitions/stringArray"}]
|
|
71
|
-
},
|
|
72
|
-
},
|
|
73
|
-
"propertyNames": {"$ref": "#"},
|
|
74
|
-
"const": True,
|
|
75
|
-
"enum": {"type": "array", "items": True, "minItems": 1, "uniqueItems": True},
|
|
76
|
-
"type": {
|
|
77
|
-
"anyOf": [
|
|
78
|
-
{"$ref": "#/definitions/simpleTypes"},
|
|
79
|
-
{
|
|
80
|
-
"type": "array",
|
|
81
|
-
"items": {"$ref": "#/definitions/simpleTypes"},
|
|
82
|
-
"minItems": 1,
|
|
83
|
-
"uniqueItems": True,
|
|
84
|
-
},
|
|
85
|
-
]
|
|
86
|
-
},
|
|
87
|
-
"format": {"type": "string"},
|
|
88
|
-
"contentMediaType": {"type": "string"},
|
|
89
|
-
"contentEncoding": {"type": "string"},
|
|
90
|
-
"if": {"$ref": "#"},
|
|
91
|
-
"then": {"$ref": "#"},
|
|
92
|
-
"else": {"$ref": "#"},
|
|
93
|
-
"allOf": {"$ref": "#/definitions/schemaArray"},
|
|
94
|
-
"anyOf": {"$ref": "#/definitions/schemaArray"},
|
|
95
|
-
"oneOf": {"$ref": "#/definitions/schemaArray"},
|
|
96
|
-
"not": {"$ref": "#"},
|
|
97
|
-
},
|
|
98
|
-
"default": True,
|
|
99
|
-
}
|
|
100
|
-
Draft7Validator.check_schema(JSON_SCHEMA_DRAFT_7_META_SCHEMA) # ensure the schema is valid
|
|
101
|
-
JSON_SCHEMA_DRAFT_7_VALIDATOR = Draft7Validator(JSON_SCHEMA_DRAFT_7_META_SCHEMA)
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
def validate_json_schema_draft_7_object(schema: dict[str, Any]) -> dict[str, Any]:
|
|
105
|
-
"""
|
|
106
|
-
Validates that a dictionary is a valid JSON schema according to the JSON
|
|
107
|
-
Schema Draft 7 specification.
|
|
108
|
-
"""
|
|
109
|
-
try:
|
|
110
|
-
JSON_SCHEMA_DRAFT_7_VALIDATOR.validate(schema)
|
|
111
|
-
except ValidationError as error:
|
|
112
|
-
raise ValueError(str(error))
|
|
113
|
-
if schema.get("type") != "object":
|
|
114
|
-
raise ValueError("The 'type' property must be 'object'")
|
|
115
|
-
return schema
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
JSONSchemaDraft7ObjectSchemaContent: TypeAlias = Annotated[
|
|
119
|
-
dict[str, Any],
|
|
120
|
-
AfterValidator(validate_json_schema_draft_7_object),
|
|
121
|
-
]
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
class JSONSchemaDraft7ObjectSchema(BaseModel):
|
|
125
|
-
type: Literal["json-schema-draft-7-object-schema"]
|
|
126
|
-
json_: JSONSchemaDraft7ObjectSchemaContent = Field(
|
|
127
|
-
...,
|
|
128
|
-
alias="json", # avoid conflict with pydantic json method
|
|
129
|
-
)
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
JSONSchemaObjectSchema: TypeAlias = Annotated[
|
|
133
|
-
Union[JSONSchemaDraft7ObjectSchema],
|
|
134
|
-
Field(discriminator="type"),
|
|
135
|
-
]
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|