felix
datasets

Preview Dataset From Hub

Preview a dataset from HuggingFace Hub without saving it.

Fetches the dataset and returns a preview (first 50 rows, schema, metadata) for user review before confirming the import.

User-authenticated requests require hf_token. Sandbox run keys omit it and import public repos anonymously. Gated or private repos must be imported in the Pioneer UI with a user token.

post/felix/datasets/preview-from-hub

Request body

repo_idstring required

HuggingFace repo ID to pull from

config_namestring nullable

HuggingFace dataset configuration, distinct from the local Pioneer name

revisionstring nullable

Specific revision/branch to pull

namestring nullable

Name for the local dataset (defaults to repo name)

hf_tokenstring nullable

HuggingFace API token. Required for user-authenticated imports. Sandbox run keys must omit this field and can only import public repos. Gated or private repos must be imported in the Pioneer UI.

session_idstring nullable

Session ID for SSE log streaming

column_mappingobject nullable

Column mapping from source to standard names

dataset_typestring nullable

Dataset type (ner, classification, custom)

type'training' | 'evaluation' | 'benchmark' nullable

Dataset purpose: 'training' (trainable), 'evaluation' (not trainable), 'benchmark' (system-managed, evaluation-only; cannot be created via this endpoint). This model is also bound to POST /felix/datasets/preview-from-hub, which ignores this field entirely -- nothing is persisted on a preview.

Response

Successful Response

preview_rowsobject[] required

Sample rows from the dataset (first 50 rows)

total_rowsinteger required

Total number of rows in the dataset

columnsstring[] required

List of column names

dataset_typestring required

Inferred dataset type (classification, ner, custom)

schema_object nullable

Inferred schema mapping column names to data types

metadataobject nullable

Dataset metadata from HuggingFace

Changes