tensorflow / tensorflow/datasets

Uploading a custom dataset

Open
#3,189 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

help
Dominant language
Python
Stars
4.6k
Forks
1.6k
Avg merge
3h 54m
Merged PRs (30d)
1

Description

I am trying to convert a huggingface dataset saved to disk to a tensorflow tfds dataset so I can retrain pegasus model.

From HF I have a set of files dir/*/ (dataset.arrow, dataset_info.json, state.json) for (train, validation, test) directories. I am trying to follow uploading a dataset to tfds https://www.tensorflow.org/datasets/add_dataset, but cannot generate_examples.

It would be nice if there was better documentation outlining how _generate_examples expects other data formats (text, json, csv, arrow) beside the simplest case, image-path/label derived from filename.

Can someone post an example here that works with an arrow/json directory? Thank you!

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the linked “adding a dataset to TFDS” guide and the _generate_examples documentation, then compare its expected inputs with the described Hugging Face directory files. Done means the documentation includes a working example for an arrow or JSON directory alongside the existing image-path/label example.

Written by the indexing model from the issue text.

Assessment

Tech stack
huggingface, python, tensorflow
Domain
data, documentation, machine-learning
Issue type
Documentation
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.