Issue with jalFaizy/detect_chess_pieces when running datasets-cli test
MEMBER
Hi @faizankshaikh

Please note that we have recently launched the Community feature, specifically targeted to create Discussions (about issues/questions/asking-for-help) on each Dataset on the Hub:
- Blog post: https://huggingface.co/blog/community-update
- Docs: https://huggingface.co/docs/hub/repositories-pull-requests-discussions

The Discussion tab for your "jalFaizy/detect_chess_pieces" dataset is here: https://huggingface.co/datasets/jalFaizy/detect_chess_pieces/discussions
You can use it to ask for help by pinging the Datasets maintainers: see our docs here: https://huggingface.co/docs/datasets/master/en/share#ask-for-a-help-and-reviews

I'm transferring this discussion to your Discussion tab and trying to address it: https://huggingface.co/datasets/jalFaizy/detect_chess_pieces/discussions/1
2022-06-29T07:49:27Z
https://github.com/huggingface/datasets/issues/4592#issuecomment-1169649180
https://api.github.com/repos/huggingface/datasets/issues/4592
IC_kwDODunzps5Ft24c
https://api.github.com/repos/huggingface/datasets/issues/comments/1169649180/reactions
2022-06-29T07:49:27Z
https://api.github.com/repos/huggingface/datasets/issues/comments/1169649180
https://avatars.githubusercontent.com/u/8515462?v=4
https://api.github.com/users/albertvillanova/events{/privacy}
https://api.github.com/users/albertvillanova/followers
https://api.github.com/users/albertvillanova/following{/other_user}
https://api.github.com/users/albertvillanova/gists{/gist_id}
https://github.com/albertvillanova
albertvillanova
MDQ6VXNlcjg1MTU0NjI=
https://api.github.com/users/albertvillanova/orgs
https://api.github.com/users/albertvillanova/received_events
https://api.github.com/users/albertvillanova/repos
https://api.github.com/users/albertvillanova/starred{/owner}{/repo}
https://api.github.com/users/albertvillanova/subscriptions
User
https://api.github.com/users/albertvillanova
public
NONE
Thank you @albertvillanova , I will keep that in mind.

Just a quick note - I posted the issue on Github because the dataset viewer suggested me to "open an issue for direct support". Maybe it can be updated with your suggestion

![image](https://user-images.githubusercontent.com/8406903/176397633-7b077d81-2044-4487-b58e-6346b05be5cf.png)



2022-06-29T09:06:25Z
https://github.com/huggingface/datasets/issues/4592#issuecomment-1169723110
https://api.github.com/repos/huggingface/datasets/issues/4592
IC_kwDODunzps5FuI7m
https://api.github.com/repos/huggingface/datasets/issues/comments/1169723110/reactions
2022-06-29T09:06:25Z
https://api.github.com/repos/huggingface/datasets/issues/comments/1169723110
https://avatars.githubusercontent.com/u/8406903?v=4
https://api.github.com/users/faizankshaikh/events{/privacy}
https://api.github.com/users/faizankshaikh/followers
https://api.github.com/users/faizankshaikh/following{/other_user}
https://api.github.com/users/faizankshaikh/gists{/gist_id}
https://github.com/faizankshaikh
faizankshaikh
MDQ6VXNlcjg0MDY5MDM=
https://api.github.com/users/faizankshaikh/orgs
https://api.github.com/users/faizankshaikh/received_events
https://api.github.com/users/faizankshaikh/repos
https://api.github.com/users/faizankshaikh/starred{/owner}{/repo}
https://api.github.com/users/faizankshaikh/subscriptions
User
https://api.github.com/users/faizankshaikh
public
MEMBER
Thank you pointing this out: yes, definitely, we should fix the error message. We are working on this.
2022-06-29T10:30:03Z
https://github.com/huggingface/datasets/issues/4592#issuecomment-1169813657
https://api.github.com/repos/huggingface/datasets/issues/4592
IC_kwDODunzps5FufCZ
https://api.github.com/repos/huggingface/datasets/issues/comments/1169813657/reactions
2022-06-29T10:30:03Z
https://api.github.com/repos/huggingface/datasets/issues/comments/1169813657
https://avatars.githubusercontent.com/u/8515462?v=4
https://api.github.com/users/albertvillanova/events{/privacy}
https://api.github.com/users/albertvillanova/followers
https://api.github.com/users/albertvillanova/following{/other_user}
https://api.github.com/users/albertvillanova/gists{/gist_id}
https://github.com/albertvillanova
albertvillanova
MDQ6VXNlcjg1MTU0NjI=
https://api.github.com/users/albertvillanova/orgs
https://api.github.com/users/albertvillanova/received_events
https://api.github.com/users/albertvillanova/repos
https://api.github.com/users/albertvillanova/starred{/owner}{/repo}
https://api.github.com/users/albertvillanova/subscriptions
User
https://api.github.com/users/albertvillanova
public
### Link

https://huggingface.co/datasets/jalFaizy/detect_chess_pieces

### Description

I am trying to write a appropriate data loader for [a custom dataset](https://huggingface.co/datasets/jalFaizy/detect_chess_pieces) using [this script](https://huggingface.co/datasets/jalFaizy/detect_chess_pieces/blob/main/detect_chess_pieces.py)

When I run the command

`$ datasets-cli test "D:\workspace\HF\detect_chess_pieces" --save_infos --all_configs`

It gives the following error

```
Using custom data configuration default
Traceback (most recent call last):
  File "c:\users\faiza\anaconda3\lib\runpy.py", line 194, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "c:\users\faiza\anaconda3\lib\runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "C:\Users\faiza\anaconda3\Scripts\datasets-cli.exe\__main__.py", line 7, in <module>
  File "c:\users\faiza\anaconda3\lib\site-packages\datasets\commands\datasets_cli.py", line 39, in main
    service.run()
  File "c:\users\faiza\anaconda3\lib\site-packages\datasets\commands\test.py", line 132, in run
    for j, builder in enumerate(get_builders()):
  File "c:\users\faiza\anaconda3\lib\site-packages\datasets\commands\test.py", line 125, in get_builders
    yield builder_cls(
  File "c:\users\faiza\anaconda3\lib\site-packages\datasets\builder.py", line 1148, in __init__
    super().__init__(*args, **kwargs)
  File "c:\users\faiza\anaconda3\lib\site-packages\datasets\builder.py", line 306, in __init__
    info = self.get_exported_dataset_info()
  File "c:\users\faiza\anaconda3\lib\site-packages\datasets\builder.py", line 405, in get_exported_dataset_info
    return self.get_all_exported_dataset_infos().get(self.config.name, DatasetInfo())
  File "c:\users\faiza\anaconda3\lib\site-packages\datasets\builder.py", line 390, in get_all_exported_dataset_infos
    return DatasetInfosDict.from_directory(cls.get_imported_module_dir())
  File "c:\users\faiza\anaconda3\lib\site-packages\datasets\info.py", line 309, in from_directory
    dataset_infos_dict = {
  File "c:\users\faiza\anaconda3\lib\site-packages\datasets\info.py", line 310, in <dictcomp>
    config_name: DatasetInfo.from_dict(dataset_info_dict)
  File "c:\users\faiza\anaconda3\lib\site-packages\datasets\info.py", line 272, in from_dict
    return cls(**{k: v for k, v in dataset_info_dict.items() if k in field_names})
  File "<string>", line 20, in __init__
  File "c:\users\faiza\anaconda3\lib\site-packages\datasets\info.py", line 160, in __post_init__
    templates = [
  File "c:\users\faiza\anaconda3\lib\site-packages\datasets\info.py", line 161, in <listcomp>
    template if isinstance(template, TaskTemplate) else task_template_from_dict(template)
  File "c:\users\faiza\anaconda3\lib\site-packages\datasets\tasks\__init__.py", line 43, in task_template_from_dict
    return template.from_dict(task_template_dict)
AttributeError: 'NoneType' object has no attribute 'from_dict'
```


My assumption is that there is some kind of issue in how the "task_templates" are read, because even if I keep them as None, or not include the argument at all, the same error occurs

### Owner

Yes