Skip to content

Commit

Permalink
docs: Environment documentation (GITBOOK-370)
Browse files Browse the repository at this point in the history
  • Loading branch information
mikeldking authored and gitbook-bot committed Nov 21, 2023
1 parent 656b5c0 commit dbbb0a7
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docs/SUMMARY.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Table of contents

* [Phoenix: AI Observability & Evaluation](README.md)
* [Environments](environments.md)
* [Example Notebooks](notebooks.md)
* [Environments](environments.md)

## 🔑 Quickstart

Expand Down
51 changes: 50 additions & 1 deletion docs/environments.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,33 @@ Phoenix app is first and foremost an application that can be run just in in your

### Notebooks

Currently phoenix supports local, colab and SageMaker notebooks.
Currently phoenix supports local, colab, and SageMaker notebooks.

{% hint style="warning" %}
Note, phoenix only supports running the phoenix server via the notebook for SageMaker notebooks. It cannot setup proxy requests for SageMaker studio since there is no support of jupyter-server-proxy
{% endhint %}

#### SageMaker

With SageMaker notebooks, phoenix leverages the [jupyter-server-proy](https://github.com/jupyterhub/jupyter-server-proxy) to host the server under `proxy/6006.`Note, that phoenix will automatically try to detect that you are running in SageMaker but you can declare the notebook runtime via a parameter to `launch_app` or an environment variable

{% tabs %}
{% tab title="Environment Variable" %}
```python
import os

os.envoron["PHOENIX_NOTEBOOK_ENV"] = "sagemaker"
```
{% endtab %}

{% tab title="Launch Parameter" %}
```python
import phoenix as px

px.launch_app(notebook_environment="sagemaker")
```
{% endtab %}
{% endtabs %}

### Container

Expand All @@ -22,3 +46,28 @@ Container images are still actively being worked on. If you are interested in ho
{% endhint %}

Phoenix server images are now available via [Docker Hub](https://hub.docker.com/r/arizephoenix/phoenix). The hosted phoenix server runs as a trace collector and can be used if you want observability for LLM traces via docker compose or simply want a long-running phoenix instance.

If you deploy the phoenix server (collector) to a remote machine, you will have to make sure to configure the remote endpoint as the collector endpoint. (This feature is only available after phoenix **1.3.x**)

{% tabs %}
{% tab title="Environment Variable" %}
```python
import os

os.envoron["PHOENIX_COLLECTOR_ENDPOINT"] = "https://my-phoenix.io"
```
{% endtab %}

{% tab title="Second Tab" %}
```python
from phoenix.trace.tracer import Tracer
from phoenix.trace.exporter import HttpExporter
from phoenix.trace.openai.instrumentor import OpenAIInstrumentor


tracer = Tracer(exporter=HttpExporter(endpoint="https://my-phoenix.io"))
OpenAIInstrumentor(tracer).instrument()
```
{% endtab %}
{% endtabs %}

0 comments on commit dbbb0a7

Please sign in to comment.