arize-phoenix 0.0.2rc4__py3-none-any.whl → 0.0.2rc5__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.

@@ -35,8 +35,16 @@ class Session:
35
35
  )
36
36
  self._is_colab = _is_colab()
37
37
 
38
- def view(self, height: int = 500) -> "IFrame":
39
- # Display the app in an iframe
38
+ def view(self, height: int = 1000) -> "IFrame":
39
+ """
40
+ Returns an IFrame that can be displayed in a notebook to view the app.
41
+
42
+ Parameters
43
+ ----------
44
+ height : int, optional
45
+ The height of the IFrame in pixels. Defaults to 1000.
46
+ """
47
+ print(f"📺 Opening a view to the Phoenix app. The app is running at {self.url}")
40
48
  return IFrame(src=self.url, width="100%", height=height)
41
49
 
42
50
  @cached_property
@@ -95,14 +103,23 @@ def launch_app(
95
103
  >>> import phoenix as px
96
104
  >>> # construct a dataset to analyze
97
105
  >>> dataset = px.Dataset(...)
98
- >>> px.launch_app(dataset)
106
+ >>> session = px.launch_app(dataset)
99
107
  """
100
108
  global _session
101
109
 
102
110
  _session = Session(primary, reference, port=config.port)
103
111
  if wait_for_boot:
104
112
  _wait_for_boot(_session.url)
113
+ print(f"🌍 To view the Phoenix app in your browser, visit {_session.url}")
114
+ print("📺 To view the Phoenix app in a notebook, run `px.active_session().view()`")
115
+ print("📖 For more information on how to use Phoenix, check out https://docs.arize.com/phoenix")
116
+ return _session
117
+
105
118
 
119
+ def active_session() -> Optional["Session"]:
120
+ """
121
+ Returns the active session if one exists, otherwise returns None
122
+ """
106
123
  return _session
107
124
 
108
125