# Creating a tfds.load compatible dataset

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fcreating-a-tfds-load-compatible-dataset%2F92634%3E%5C
**Category:** Beginners\
**Created:** [June 17, 2024, 7:54pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fcreating-a-tfds-load-compatible-dataset%2F92634 "2024-06-17T19:54:35Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![anon81722923](https://avatars.discourse-cdn.com/v4/letter/a/e274bd/32.png) [@anon81722923](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fanon81722923)%5C
**Post date:** [June 17, 2024, 7:54pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fcreating-a-tfds-load-compatible-dataset%2F92634%2F1 "2024-06-17T19:54:36Z")

</div>

Hi everyone,

What I’m actually trying to do is quite simple but seems poorly documented.  
All I want is to create an image dataset that I will be able to import through tfds, using `tfds.load()`.

I first tried with the most simple scenario, which is importing the existing [cats\_vs\_dogs dataset](https://huggingface.co/datasets/microsoft/cats_vs_dogs)  
and loading it with:

```python
train_ds, validation_ds, test_ds = tfds.load(
    "huggingface:microsoft__cats_vs_dogs",
    split=["train[:40%]", "train[40%:50%]", "train[50%:60%]"],
    as_supervised=True, # Include labels
)

```

And it worked, as expected.

I then tried to import this dataset on my personal space with simple piece of code:

```python
from datasets import load_dataset

dataset = load_dataset("microsoft/cats_vs_dogs")
dataset.push_to_hub("my_username/cats_vs_dogs")

```

Which resulted in a parquet dataset, as I could expect.

My surprise was to find out that this didn’t work:

```python
train_ds, validation_ds, test_ds = tfds.load(
    "huggingface:my_username__cats_vs_dogs",
    split=["train[:40%]", "train[40%:50%]", "train[50%:60%]"],
    as_supervised=True, # Include labels
)

```

I end up an error such as: _dataset doesn’t support supervised learning_ …

Also tried to create a dataset from [ImageFolder](https://huggingface.co/docs/datasets/image_dataset#create-an-image-dataset), but I got a different error from pillow: “Impossible to parse ByteIO image” (kinda) when importing the dataset with tfds.

What am I missing there ?  
Any help is appreciated
