DatasetUploader reads a CSV testset and uploads it to Arize Phoenix as one named dataset per unique tag value. It handles three conflict modes (skip, overwrite, append) and supports multi-tag rows via a configurable delimiter.
from phoenix.client import Client
from evalwire.uploader import DatasetUploader
client = Client()
uploader = DatasetUploader(
csv_path="data/testset.csv",
phoenix_client=client,
)
datasets = uploader.upload(on_exist="skip")
print(datasets) # {"es_search": <Dataset>, "source_router": <Dataset>}The CSV must contain at least a tag column, one input column, and one expected-output column:
user_query,expected_output,tags
"find cycling paths","url-a | url-b","es_search | source_router"
"find parks","url-c","es_search"Pipe-delimited values in any column are split into lists. A row with tags = "es_search | source_router" is added to both datasets.
on_exist |
Behaviour |
|---|---|
"skip" |
Do nothing if the dataset already exists. |
"overwrite" |
Delete the existing dataset and re-create it. |
"append" |
Call add_examples_to_dataset on the existing dataset. If not found, create it. |
- Phoenix raises
ValueError(not a Phoenix-specific exception) whenget_datasetis called for a non-existent dataset. evalwire catches this and creates the dataset instead. - There is no official delete method in the Phoenix Python client. evalwire calls the REST endpoint
DELETE /v1/datasets/{id}directly for theoverwritemode. - Creating a dataset with a name that already exists returns a 409 Conflict error, not a new version. Use
on_exist="overwrite"to replace it.
- Configuration Reference for
evalwire.tomlkeys - CLI Reference for
evalwire upload
::: evalwire.uploader