Skip to content

API client for datasets-server #1583

@Wauplin

Description

@Wauplin

Originally from @davanstrien on slack (internal link)

Datasets Server is a lightweight web API for visualizing and exploring all types of datasets stored on the Hugging Face Hub (see repo and docs). Having a client API in huggingface_hub would make sense to lower the barrier.

Example:

from huggingface_hub import datasets_server

rows = datasets_server.get_first_rows('imdb', config='default', n_rows=10) # returns a generator of rows 

columns = datasets_server.get_datasets_features('imdb')

The client could live either in huggingface_hub or datasets. From @davanstrien: My 2c is that it could make sense to have it in huggingface_hub more since this library is already interacting with many APIs related to the hub. I think there could also in future be other endpoints on datasets-server which are dataset related but more on the hub side than related to the dataset itself i.e. find similar datasets based on content (huggingface/dataset-viewer#396)

cc @severo @lhoestq

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions