# Huggingface\_hub list\_datasets call

**URL:** <https://discuss.huggingface.co/t/huggingface-hub-list-datasets-call/20562>\
**Category:** 🤗Hub\
**Created:** [July 19, 2022, 10:20am UTC](https://discuss.huggingface.co/t/huggingface-hub-list-datasets-call/20562 "2022-07-19T10:20:49Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![ademait](https://avatars.discourse-cdn.com/v4/letter/a/6de8d8/32.png) [@ademait](https://discuss.huggingface.co/u/ademait)\
**Post date:** [July 19, 2022, 10:20am UTC](https://discuss.huggingface.co/t/huggingface-hub-list-datasets-call/20562/1 "2022-07-19T10:20:49Z")

</div>

Hi everyone,

I’m working with the huggingface\_hub client library, which works so smooth!

The reason to create this post is that I noticed that when calling the function `list_datasets` with the parameter `full=True`, the `siblings` field (which has the names of the repository files) is always `None`.  
However, when calling the function `list_repo_files` with the parameter `repo_type` set to “dataset” we can retrieve all the files in the repository.

`siblings` attribute are of the class `ModelFile`. Is there an ongoing implementation for the _DatasetFile_ or another way to retrieve the filenames of a dataset repository with the `list_datasets` call?

Thank you in advance

---

<div class="post-metadata">

**Author:** ![merve](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/merve/32/49809_2.png) [@merve](https://discuss.huggingface.co/u/merve)\
**Post date:** [July 19, 2022, 11:12am UTC](https://discuss.huggingface.co/t/huggingface-hub-list-datasets-call/20562/2 "2022-07-19T11:12:34Z")

</div>

Hello there,

`list_datasets` function is used to _filter all datasets on Hub with a given filter_, meanwhile `list_repo_files` iterates over files of a given repository and thus you get siblings. Since they serve different purposes on different scopes, I’d suggest you to use `list_repo_files` to _list siblings in a given repository_.

---

<div class="post-metadata">

**Author:** ![ademait](https://avatars.discourse-cdn.com/v4/letter/a/6de8d8/32.png) [@ademait](https://discuss.huggingface.co/u/ademait)\
**Post date:** [July 19, 2022, 11:35am UTC](https://discuss.huggingface.co/t/huggingface-hub-list-datasets-call/20562/3 "2022-07-19T11:35:53Z")

</div>

Hi @merve,

I understand the idea here, but I was wondering is why is there a field in `list_datasets` while never gives back the file’s list.

---

<div class="post-metadata">

**Author:** ![mariosasko](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/mariosasko/32/31548_2.png) [@mariosasko](https://discuss.huggingface.co/u/mariosasko)\
**Post date:** [October 21, 2022, 3:43pm UTC](https://discuss.huggingface.co/t/huggingface-hub-list-datasets-call/20562/4 "2022-10-21T15:43:39Z")

</div>

Hi! I agree we should either fetch this info with `full=True` or remove the field. cc @Wauplin

---

<div class="post-metadata">

**Author:** ![Wauplin](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/wauplin/32/40815_2.png) [@Wauplin](https://discuss.huggingface.co/u/Wauplin)\
**Post date:** [October 31, 2022, 4:00pm UTC](https://discuss.huggingface.co/t/huggingface-hub-list-datasets-call/20562/5 "2022-10-31T16:00:55Z")

</div>

The idea is that we have in `huggingface_hub` a `ModelInfo` object to describe a model. Depending on the use case, not all information is fetched from the server (especially listing all files from each repo when listing all repos). If an information is not fetched, is it set to `None`. Maybe not optimal but not sure we want to change this anytime soon. A solution to change this would be to have different classes `ModelInfoXXX` depending on the context but not sure it will be easier to use from a user perspective.
