diff --git a/docs/SUMMARY.md b/docs/SUMMARY.md index 1bbc198e3d..40635a8218 100644 --- a/docs/SUMMARY.md +++ b/docs/SUMMARY.md @@ -1,8 +1,8 @@ # Table of contents * [Phoenix: AI Observability & Evaluation](README.md) -* [Environments](environments.md) * [Example Notebooks](notebooks.md) +* [Environments](environments.md) ## 🔑 Quickstart diff --git a/docs/environments.md b/docs/environments.md index b92ec9d658..68ce63834d 100644 --- a/docs/environments.md +++ b/docs/environments.md @@ -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 @@ -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 %} +