Exporting via SDK

We allow exporting all datasets via our SDKs. This allows you to use your datasets for:

  • Evaluation: Run ad-hoc experiments or continuous integrations tests against a reference dataset
  • Fine-Tuning: Use datasets for fine-tuning and validating your custom model

Prerequisites:

  • Get your API key & project name.

Expected time: few minutes

1

Get the dataset & datapoint IDs

Using your dataset name, we will first get the unique ids for the dataset & the datapoints in it.

import honeyhive

s = honeyhive.HoneyHive(
    bearer_auth="<YOUR_BEARER_TOKEN_HERE>",
)

datapoint_ids = []
dataset_name = 'DATASET_NAME'
res = s.datasets.get_datasets(project='PROJECT_NAME')

if res.object is not None:
    # handle response
    for dataset in res.object.datasets:
        if dataset.name == dataset_name:
            datapoint_ids = dataset.datapoints
            break
    pass
2

Export the dataset

Now that we have the dataset & datapoint IDs, we can export the dataset.

datapoints_res = s.datapoints.get_datapoints(project='PROJECT_NAME', datapoint_ids=datapoint_ids)

if datapoints_res.object is not None:
    # handle response
    return datapoints_res.object.datapoints
else:
    return []