import phoenix as px
client = px.Client()
df = client.upload_dataset(
dataframe=df_support_data,
dataset_name="customer_support_queries",
input_keys=["input"],
output_keys=["output", "classification"],
)px.Client() fails to connect with my self hosted phonix. What can I do to connect with my self-hosted phonix instance and then upload dataset to it?
To connect px.Client() to your self-hosted Phoenix instance, set the PHOENIX_COLLECTOR_ENDPOINT environment variable to your server's URL (e.g., http://<your-host> :6006) before creating the client. For example: LBKSimport os os.environ["PHOENIX_COLLECTOR_ENDPOINT"] = "http://<your-host> :6006"LBKSimport phoenix as px client = px.Client() client.upload_dataset( dataframe=df_support_data, dataset_name="customer_support_queries", input_keys=["input"], output_keys=["output", "classification"], )LBKSThis tells the client to send requests to your self-hosted server instead of starting a local instance. No API key is needed for self-hosted by default. See Phoenix Environments Guide and Slack discussion for details.Would you like more detail on troubleshooting connection issues or environment setup?Sources:
- Phoenix Environments Guide
- Slack discussion
馃挕聽Hint: Mention RunLLM in the thread for followups.
Hey Prerit S. - some of our docs point to px.Client but we're heavily investing in this self-contained client https://arize-phoenix.readthedocs.io/projects/client/en/latest/ Let us know if this makes sense.
I tried that self contained client but it complained that it does not have method called upload_dataset..
Documentation is also not very clear
Can you give me the code snippet for uploading dataset with self-contained client?
Yeah sorry about that. working on a full revamp here. There's examples here: https://arize-phoenix.readthedocs.io/projects/client/en/latest/api/client.html#datasets
dataset = client.datasets.upload_dataset( dataframe=df_cleaned, input_keys=[], output_keys=[], dataset_name="pipeline-inspection-final-df", ) I tried this but says Datasets object has no attribute 'upload_dataset'
it's now called create_dataset
ok..worked now
Great! We're working on a big revamp. Here's the changeover: https://github.com/Arize-ai/phoenix/blob/f17a6c596f48d24897d9025d52b9c440ae172e8e/.cursor/rules/client-migration.mdc#L19
