# Dataset viewer doesn't work if split != "train"

**URL:** <https://discuss.huggingface.co/t/dataset-viewer-doesnt-work-if-split-train/168712>\
**Category:** 🤗Datasets\
**Created:** [September 26, 2025, 10:27pm UTC](https://discuss.huggingface.co/t/dataset-viewer-doesnt-work-if-split-train/168712 "2025-09-26T22:27:22Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![roemmele](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/roemmele/32/54309_2.png) [@roemmele](https://discuss.huggingface.co/u/roemmele)\
**Post date:** [September 26, 2025, 10:27pm UTC](https://discuss.huggingface.co/t/dataset-viewer-doesnt-work-if-split-train/168712/1 "2025-09-26T22:27:22Z")

</div>

I’m trying to upload a dataset to the hub. My dataset consists of an test set only, there’s no training set. However, when I try to specify a split name other than “train” in the dataset card (e.g. “test”), I get the error “The dataset viewer is not available for this split.”:

 ![Screenshot 2025-09-26 at 3.06.11 PM](https://us1.discourse-cdn.com/hellohellohello/original/3X/1/0/10b485bac94c1f1662e6f4d6ab4a539acb5a2dbe.png)

---

<div class="post-metadata">

**Author:** ![John6666](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/john6666/32/27664_2.png) [@John6666](https://discuss.huggingface.co/u/John6666)\
**Post date:** [September 26, 2025, 10:36pm UTC](https://discuss.huggingface.co/t/dataset-viewer-doesnt-work-if-split-train/168712/2 "2025-09-26T22:36:10Z")

</div>

The `YAML` section at the top of `README.md` serves as the configuration file, so [configuring it there might make it work](https://huggingface.co/docs/hub/en/datasets-manual-configuration).

---

<div class="post-metadata">

**Author:** ![roemmele](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/roemmele/32/54309_2.png) [@roemmele](https://discuss.huggingface.co/u/roemmele)\
**Post date:** [September 26, 2025, 11:31pm UTC](https://discuss.huggingface.co/t/dataset-viewer-doesnt-work-if-split-train/168712/3 "2025-09-26T23:31:55Z")

</div>

Thanks for the reply! As far as I can tell, I am following the documentation in the page you linked. Here’s the dataset page: [roemmele/SceneIllustrations · Datasets at Hugging Face](https://huggingface.co/datasets/roemmele/SceneIllustrations). In the metadata section of README.md, I’m specifying “name: test” under “splits”. I don’t have anything in the metadata referencing “train”, so “train” should not be expected as a data split.

---

<div class="post-metadata">

**Author:** ![John6666](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/john6666/32/27664_2.png) [@John6666](https://discuss.huggingface.co/u/John6666)\
**Post date:** [September 27, 2025, 2:11am UTC](https://discuss.huggingface.co/t/dataset-viewer-doesnt-work-if-split-train/168712/4 "2025-09-27T02:11:04Z")

</div>

Hmm… This part?

```yaml
---
dataset_info:
  features:
    - name: id
      dtype: string
    - name: phase
      dtype: int64
    - name: story
      dtype: string
    - name: position
      dtype: int64
    - name: fragment
      dtype: string
    - name: fragment_id
      dtype: string
    - name: illustration1
      dtype: image
    - name: illustration2
      dtype: image
    - name: annotator_selections
      sequence: string # was: list: string ← fix
...
...
---

```

Or simply [removing config for features](https://huggingface.co/docs/datasets/main/en/repository_structure):

```yaml
---
license: cc-by-nc-sa-4.0
language: en
task_categories:
  - text-to-image
pretty_name: SceneIllustrations
configs:
  - config_name: default
    data_files:
      - split: test
        path: "data/data_chunk_*.parquet" # use the real extension: .parquet / .jsonl / .csv
---

```

---

<div class="post-metadata">

**Author:** ![roemmele](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/roemmele/32/54309_2.png) [@roemmele](https://discuss.huggingface.co/u/roemmele)\
**Post date:** [September 29, 2025, 6:03pm UTC](https://discuss.huggingface.co/t/dataset-viewer-doesnt-work-if-split-train/168712/5 "2025-09-29T18:03:52Z")

</div>

Yes, this is the part that references the “test” split:

```auto
  splits:
    - name: test
      num_bytes: 6633552671
      num_examples: 2990
  configs:
    - config_name: default
      data_files:
        - split: test
          path: data/data_chunk_*

```

---

<div class="post-metadata">

**Author:** ![John6666](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/john6666/32/27664_2.png) [@John6666](https://discuss.huggingface.co/u/John6666)\
**Post date:** [September 29, 2025, 9:30pm UTC](https://discuss.huggingface.co/t/dataset-viewer-doesnt-work-if-split-train/168712/6 "2025-09-29T21:30:16Z")

</div>

Seems path is slightly wrong. Try this also.

```yaml
  splits:
    - name: test
      num_bytes: 6633552671
      num_examples: 2990
  configs:
    - config_name: default
      data_files:
        - split: test
          path:
            - data_chunk_*.parquet
            - data/data_chunk_*.parquet

```

---

<div class="post-metadata">

**Author:** ![roemmele](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/roemmele/32/54309_2.png) [@roemmele](https://discuss.huggingface.co/u/roemmele)\
**Post date:** [September 30, 2025, 6:14pm UTC](https://discuss.huggingface.co/t/dataset-viewer-doesnt-work-if-split-train/168712/7 "2025-09-30T18:14:32Z")

</div>

Ah, thanks for pointing out the issue with the path. I’ve fixed that, but still getting the same “Bad split” error.

---

<div class="post-metadata">

**Author:** ![John6666](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/john6666/32/27664_2.png) [@John6666](https://discuss.huggingface.co/u/John6666)\
**Post date:** [September 30, 2025, 8:39pm UTC](https://discuss.huggingface.co/t/dataset-viewer-doesnt-work-if-split-train/168712/8 "2025-09-30T20:39:45Z")

</div>

DatasetViewer GUI doesn’t seem to work unless a `train` split exists (even a dummy one). This should make it work. Also, if `list` don’t work in `Features`, try using `sequence`.

```yaml
  splits:
    - name: train
      num_examples: 2990
      num_bytes: 6633552671
    - name: test
      num_examples: 2990
      num_bytes: 6633552671
  configs:
    - config_name: default
      data_files:
        - split: train
          path: data_chunk_*.parquet
        - split: test
          path: data_chunk_*.parquet

```

---

<div class="post-metadata">

**Author:** ![roemmele](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/roemmele/32/54309_2.png) [@roemmele](https://discuss.huggingface.co/u/roemmele)\
**Post date:** [October 1, 2025, 1:13am UTC](https://discuss.huggingface.co/t/dataset-viewer-doesnt-work-if-split-train/168712/9 "2025-10-01T01:13:41Z")

</div>

Thanks, but even with that config, the dataset viewer still fails to display the `test`split (same “bad split” error). I’m thinking this is an issue that should be addressed in a future code update to the dataset viewer - do you know where to file this issue?

---

<div class="post-metadata">

**Author:** ![John6666](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/john6666/32/27664_2.png) [@John6666](https://discuss.huggingface.co/u/John6666)\
**Post date:** [October 1, 2025, 1:18am UTC](https://discuss.huggingface.co/t/dataset-viewer-doesnt-work-if-split-train/168712/10 "2025-10-01T01:18:16Z")

</div>

> the dataset viewer still fails to display the `test`split (same “bad split” error)

Seems so…

> do you know where to file this issue?

[Here](https://github.com/huggingface/dataset-viewer/issues).
