Skip to content

Commit

Permalink
docs: use kwargs with datasets (#3748) (#3749)
Browse files Browse the repository at this point in the history
  • Loading branch information
mikeldking authored Jun 29, 2024
1 parent 1cba50e commit 599e340
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ dataset_df = pd.DataFrame(data={"query": queries, "responses": responses})
px.launch_app()
client = px.Client()
dataset = client.upload_dataset(
dataset_df,
name="physics-questions",
dataframe=dataset_df,
dataset_name="physics-questions",
input_keys=["query"],
output_keys=["responses"],
)
Expand Down Expand Up @@ -119,7 +119,7 @@ import phoenix as px
# Note that the below code assumes that phoenix is running and accessible
client = px.Client()
client.upload_dataset(
questions_df, name="paul-graham-questions",
dataframe=questions_df, dataset_name="paul-graham-questions",
input_keys=["question"],
output_keys=["output"],
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,10 @@ The dataframe can be sent to `Phoenix` via the `Client`. `input_keys` and `outpu
import phoenix as px

dataset = px.Client().upload_dataset(
df,
dataframe=df,
input_keys=["question"],
output_keys=[],
name="nba-questions",
dataset_name="nba-questions",
)
```

Expand Down
4 changes: 2 additions & 2 deletions docs/datasets-and-experiments/quickstart-datasets.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ df = pd.DataFrame(
)
phoenix_client = px.Client()
dataset = phoenix_client.upload_dataset(
df,
name="test-dataset",
dataframe=df,
dataset_name="test-dataset",
input_keys=["question"],
output_keys=["answer"],
metadata_keys=["metadata"],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,10 @@ df = (
)
now = datetime.now().strftime("%Y-%m-%d %H:%M:%S")
dataset = px.Client().upload_dataset(
df,
dataframe=df,
input_keys=["article"],
output_keys=["summary"],
name=f"news-article-summaries-{now}",
dataset_name=f"news-article-summaries-{now}",
)
```

Expand Down
4 changes: 2 additions & 2 deletions docs/datasets-and-experiments/use-cases-datasets/text2sql.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,10 +136,10 @@ Let's store the data above as a versioned dataset in phoenix.
import pandas as pd

ds = px.Client().upload_dataset(
pd.DataFrame([{"question": question} for question in questions]),
dataframe=pd.DataFrame([{"question": question} for question in questions]),
input_keys=["question"],
output_keys=[],
name="nba-questions",
dataset_name="nba-questions",
)

# If you have already uploaded the dataset, you can fetch it using the following line
Expand Down

0 comments on commit 599e340

Please sign in to comment.