arize-phoenix 4.11.0__py3-none-any.whl → 4.12.0rc1__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.

@@ -1,3 +1,43 @@
1
+ {% set rendered_files = [] %}
2
+ {% set rendered_chunks = [] %}
3
+
4
+ {% macro render_chunk(chunk_name, level=0) %}
5
+ {% if chunk_name not in rendered_chunks %}
6
+ {% set _ = rendered_chunks.append(chunk_name) %}
7
+ {% set chunk = manifest[chunk_name] %}
8
+
9
+ {% if chunk.css %}
10
+ {% for css_file in chunk.css %}
11
+ {% if css_file not in rendered_files %}
12
+ <link rel="stylesheet" href="{{ basename }}/{{ css_file }}">
13
+ {% set _ = rendered_files.append(css_file) %}
14
+ {% endif %}
15
+ {% endfor %}
16
+ {% endif %}
17
+
18
+ {% if chunk.imports %}
19
+ {% for import in chunk.imports %}
20
+ {{ render_chunk(import, level + 1) }}
21
+ {% endfor %}
22
+ {% endif %}
23
+
24
+ {% if level == 0 %}
25
+ {% if chunk.file.endswith('.js') and chunk.file not in rendered_files %}
26
+ <script type="module" src="{{ basename }}/{{ chunk.file }}"></script>
27
+ {% set _ = rendered_files.append(chunk.file) %}
28
+ {% elif chunk.file.endswith('.css') and chunk.file not in rendered_files %}
29
+ <link rel="stylesheet" href="{{ basename }}/{{ chunk.file }}">
30
+ {% set _ = rendered_files.append(chunk.file) %}
31
+ {% endif %}
32
+ {% endif %}
33
+
34
+ {% if chunk.file.endswith('.js') and chunk.file not in rendered_files %}
35
+ <link rel="modulepreload" href="{{ basename }}/{{ chunk.file }}">
36
+ {% set _ = rendered_files.append(chunk.file) %}
37
+ {% endif %}
38
+ {% endif %}
39
+ {% endmacro %}
40
+
1
41
  <!DOCTYPE html>
2
42
  <html>
3
43
  <head>
@@ -11,7 +51,6 @@
11
51
  <meta property="og:description" content="AI Observability & Evaluation" />
12
52
  <meta property="og:image" content="https://raw.githubusercontent.com/Arize-ai/phoenix-assets/main/images/socal/social-preview-horizontal.jpg" />
13
53
  <meta name="theme-color" content="#ffffff" />
14
- <link rel="stylesheet" src="{{basename}}/index.css"></link>
15
54
  <link
16
55
  rel="stylesheet"
17
56
  href="https://fonts.googleapis.com/css2?family=Roboto:wght@100;300;400;500;700;900&display=swap"
@@ -21,28 +60,40 @@
21
60
  <body>
22
61
  <div id="root"></div>
23
62
  <script>(function() {
24
- // Request Info:
25
- // URL: {{request.url}}
26
- // Base URL: {{request.base_url}}
27
- // Root Path: {{root_path}}
28
- Object.defineProperty(window, "Config", {
29
- // Place any server-side injected config here
30
- // E.g. default UMAP parameters etc. that needs to be
31
- // injected into the client before React runs
32
- value: Object.freeze({
33
- basename: "{{basename}}",
34
- platformVersion: "{{platform_version}}",
35
- hasInferences: Boolean("{{has_inferences}}" == "True"),
36
- hasCorpus: Boolean("{{has_corpus}}" == "True"),
37
- UMAP: {
38
- minDist: parseFloat("{{min_dist}}"),
39
- nNeighbors: parseInt("{{n_neighbors}}"),
40
- nSamples: parseInt("{{n_samples}}"),
41
- }
42
- }),
43
- writable: false
44
- });
45
- })()</script>
46
- <script type="module" src="{{basename}}/index.js"></script>
47
- </body>
63
+ // Request Info:
64
+ // URL: {{request.url}}
65
+ // Base URL: {{request.base_url}}
66
+ // Root Path: {{root_path}}
67
+ Object.defineProperty(window, "Config", {
68
+ // Place any server-side injected config here
69
+ // E.g. default UMAP parameters etc. that needs to be
70
+ // injected into the client before React runs
71
+ value: Object.freeze({
72
+ basename: "{{basename}}",
73
+ platformVersion: "{{platform_version}}",
74
+ hasInferences: Boolean("{{has_inferences}}" == "True"),
75
+ hasCorpus: Boolean("{{has_corpus}}" == "True"),
76
+ UMAP: {
77
+ minDist: parseFloat("{{min_dist}}"),
78
+ nNeighbors: parseInt("{{n_neighbors}}"),
79
+ nSamples: parseInt("{{n_samples}}"),
80
+ }
81
+ }),
82
+ writable: false
83
+ });
84
+ })()</script>
85
+ {% if is_development %}
86
+ <script type="module">
87
+ import RefreshRuntime from 'http://localhost:5173/@react-refresh'
88
+ RefreshRuntime.injectIntoGlobalHook(window)
89
+ window.$RefreshReg$ = () => {}
90
+ window.$RefreshSig$ = () => (type) => type
91
+ window.__vite_plugin_react_preamble_installed__ = true
92
+ </script>
93
+ <script type="module" src="http://localhost:5173/@vite/client"></script>
94
+ <script type="module" src="http://localhost:5173/index.tsx"></script>
95
+ {% else %}
96
+ {{ render_chunk('index.tsx') }}
97
+ {% endif %}
98
+ </body>
48
99
  </html>
phoenix/session/client.py CHANGED
@@ -51,6 +51,9 @@ from phoenix.trace.otel import encode_span_to_otlp
51
51
 
52
52
  logger = logging.getLogger(__name__)
53
53
 
54
+
55
+ DEFAULT_TIMEOUT_IN_SECONDS = 5
56
+
54
57
  DatasetAction: TypeAlias = Literal["create", "append"]
55
58
 
56
59
 
@@ -120,6 +123,7 @@ class Client(TraceDataExtractor):
120
123
  project_name: Optional[str] = None,
121
124
  # Deprecated
122
125
  stop_time: Optional[datetime] = None,
126
+ timeout: Optional[int] = DEFAULT_TIMEOUT_IN_SECONDS,
123
127
  ) -> Optional[Union[pd.DataFrame, List[pd.DataFrame]]]:
124
128
  """
125
129
  Queries spans from the Phoenix server or active session based on specified criteria.
@@ -159,6 +163,7 @@ class Client(TraceDataExtractor):
159
163
  "limit": limit,
160
164
  "root_spans_only": root_spans_only,
161
165
  },
166
+ timeout=timeout,
162
167
  )
163
168
  if response.status_code == 404:
164
169
  logger.info("No spans found.")
@@ -9,6 +9,7 @@ from phoenix.trace.dsl import SpanQuery
9
9
  from phoenix.trace.trace_dataset import TraceDataset
10
10
 
11
11
  DEFAULT_SPAN_LIMIT = 1000
12
+ DEFAULT_TIMEOUT_IN_SECONDS = 5
12
13
 
13
14
 
14
15
  class TraceDataExtractor(ABC):
@@ -26,6 +27,7 @@ class TraceDataExtractor(ABC):
26
27
  limit: Optional[int] = DEFAULT_SPAN_LIMIT,
27
28
  root_spans_only: Optional[bool] = None,
28
29
  project_name: Optional[str] = None,
30
+ timeout: Optional[int] = DEFAULT_TIMEOUT_IN_SECONDS,
29
31
  ) -> Optional[Union[pd.DataFrame, List[pd.DataFrame]]]: ...
30
32
 
31
33
  def get_spans_dataframe(
@@ -37,6 +39,7 @@ class TraceDataExtractor(ABC):
37
39
  limit: Optional[int] = DEFAULT_SPAN_LIMIT,
38
40
  root_spans_only: Optional[bool] = None,
39
41
  project_name: Optional[str] = None,
42
+ timeout: Optional[int] = DEFAULT_TIMEOUT_IN_SECONDS,
40
43
  ) -> Optional[pd.DataFrame]:
41
44
  return cast(
42
45
  Optional[pd.DataFrame],
@@ -47,6 +50,7 @@ class TraceDataExtractor(ABC):
47
50
  limit=limit,
48
51
  root_spans_only=root_spans_only,
49
52
  project_name=project_name,
53
+ timeout=timeout,
50
54
  ),
51
55
  )
52
56
 
@@ -59,8 +63,23 @@ class TraceDataExtractor(ABC):
59
63
  def get_trace_dataset(
60
64
  self,
61
65
  project_name: Optional[str] = None,
66
+ *,
67
+ start_time: Optional[datetime] = None,
68
+ end_time: Optional[datetime] = None,
69
+ limit: Optional[int] = DEFAULT_SPAN_LIMIT,
70
+ root_spans_only: Optional[bool] = None,
71
+ timeout: Optional[int] = DEFAULT_TIMEOUT_IN_SECONDS,
62
72
  ) -> Optional[TraceDataset]:
63
- if (dataframe := self.get_spans_dataframe(project_name=project_name)) is None:
73
+ if (
74
+ dataframe := self.get_spans_dataframe(
75
+ project_name=project_name,
76
+ start_time=start_time,
77
+ end_time=end_time,
78
+ limit=limit,
79
+ root_spans_only=root_spans_only,
80
+ timeout=timeout,
81
+ )
82
+ ) is None:
64
83
  return None
65
84
  evaluations = self.get_evaluations(project_name=project_name)
66
85
  return TraceDataset(dataframe=dataframe, evaluations=evaluations)
@@ -75,6 +75,9 @@ global _session_working_dir
75
75
  _session_working_dir: Optional["TemporaryDirectory[str]"] = None
76
76
 
77
77
 
78
+ DEFAULT_TIMEOUT_IN_SECONDS = 5
79
+
80
+
78
81
  class NotebookEnvironment(Enum):
79
82
  COLAB = "colab"
80
83
  LOCAL = "local"
@@ -152,6 +155,7 @@ class Session(TraceDataExtractor, ABC):
152
155
  project_name: Optional[str] = None,
153
156
  # Deprecated fields
154
157
  stop_time: Optional[datetime] = None,
158
+ timeout: Optional[int] = DEFAULT_TIMEOUT_IN_SECONDS,
155
159
  ) -> Optional[Union[pd.DataFrame, List[pd.DataFrame]]]:
156
160
  """
157
161
  Queries the spans in the project based on the provided parameters.
phoenix/version.py CHANGED
@@ -1 +1 @@
1
- __version__ = "4.11.0"
1
+ __version__ = "4.12.0rc1"
@@ -1,6 +0,0 @@
1
- html{line-height:1.15;-webkit-text-size-adjust:100%}body{margin:0}main{display:block}h1{font-size:2em;margin:.67em 0}hr{box-sizing:content-box;height:0;overflow:visible}pre{font-family:monospace,monospace;font-size:1em}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0}button,input{overflow:visible}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button}button::-moz-focus-inner,[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:.35em .75em .625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}progress{vertical-align:baseline}textarea{overflow:auto}[type=checkbox],[type=radio]{box-sizing:border-box;padding:0}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}
2
- /*! Bundled license information:
3
-
4
- normalize.css/normalize.css:
5
- (*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css *)
6
- */