Dict feature is non-nullable while nested dict feature is
MEMBER
It looks like a bug, by default every feature should be nullable.
2024-03-19T11:41:36Z
https://github.com/huggingface/datasets/issues/6738#issuecomment-2006960639
https://api.github.com/repos/huggingface/datasets/issues/6738
IC_kwDODunzps53n8n_
https://api.github.com/repos/huggingface/datasets/issues/comments/2006960639/reactions
2024-03-19T11:41:36Z
https://api.github.com/repos/huggingface/datasets/issues/comments/2006960639
https://avatars.githubusercontent.com/u/42851186?v=4
https://api.github.com/users/lhoestq/events{/privacy}
https://api.github.com/users/lhoestq/followers
https://api.github.com/users/lhoestq/following{/other_user}
https://api.github.com/users/lhoestq/gists{/gist_id}
https://github.com/lhoestq
lhoestq
MDQ6VXNlcjQyODUxMTg2
https://api.github.com/users/lhoestq/orgs
https://api.github.com/users/lhoestq/received_events
https://api.github.com/users/lhoestq/repos
https://api.github.com/users/lhoestq/starred{/owner}{/repo}
https://api.github.com/users/lhoestq/subscriptions
User
https://api.github.com/users/lhoestq
public
COLLABORATOR
I've linked a PR with a fix :)
2024-03-19T17:10:21Z
https://github.com/huggingface/datasets/issues/6738#issuecomment-2007712656
https://api.github.com/repos/huggingface/datasets/issues/6738
IC_kwDODunzps53q0OQ
https://api.github.com/repos/huggingface/datasets/issues/comments/2007712656/reactions
2024-03-19T17:10:21Z
https://api.github.com/repos/huggingface/datasets/issues/comments/2007712656
https://avatars.githubusercontent.com/u/47462742?v=4
https://api.github.com/users/mariosasko/events{/privacy}
https://api.github.com/users/mariosasko/followers
https://api.github.com/users/mariosasko/following{/other_user}
https://api.github.com/users/mariosasko/gists{/gist_id}
https://github.com/mariosasko
mariosasko
MDQ6VXNlcjQ3NDYyNzQy
https://api.github.com/users/mariosasko/orgs
https://api.github.com/users/mariosasko/received_events
https://api.github.com/users/mariosasko/repos
https://api.github.com/users/mariosasko/starred{/owner}{/repo}
https://api.github.com/users/mariosasko/subscriptions
User
https://api.github.com/users/mariosasko
public
CONTRIBUTOR
@mariosasko awesome thank you!
2024-03-20T10:24:14Z
https://github.com/huggingface/datasets/issues/6738#issuecomment-2009217261
https://api.github.com/repos/huggingface/datasets/issues/6738
IC_kwDODunzps53wjjt
https://api.github.com/repos/huggingface/datasets/issues/comments/2009217261/reactions
2024-03-20T10:24:14Z
https://api.github.com/repos/huggingface/datasets/issues/comments/2009217261
https://avatars.githubusercontent.com/u/16348744?v=4
https://api.github.com/users/polinaeterna/events{/privacy}
https://api.github.com/users/polinaeterna/followers
https://api.github.com/users/polinaeterna/following{/other_user}
https://api.github.com/users/polinaeterna/gists{/gist_id}
https://github.com/polinaeterna
polinaeterna
MDQ6VXNlcjE2MzQ4NzQ0
https://api.github.com/users/polinaeterna/orgs
https://api.github.com/users/polinaeterna/received_events
https://api.github.com/users/polinaeterna/repos
https://api.github.com/users/polinaeterna/starred{/owner}{/repo}
https://api.github.com/users/polinaeterna/subscriptions
User
https://api.github.com/users/polinaeterna
public
When i try to create a `Dataset` object with None values inside a dict column, like this: 
```python
from datasets import Dataset, Features, Value

Dataset.from_dict(
    {
        "dict": [{"a": 0, "b": 0}, None],
    }, features=Features(
        {"dict": {"a": Value("int16"), "b": Value("int16")}}
    )
)
```
i get `ValueError: Got None but expected a dictionary instead`.


At the same time, having None in _nested_ dict feature works, for example, this doesn't throw any errors:

```python
from datasets import Dataset, Features, Value, Sequence

dataset = Dataset.from_dict(
    {
        "list_dict": [[{"a": 0, "b": 0}], None],
        "sequence_dict": [[{"a": 0, "b": 0}], None],
    }, features=Features({
        "list_dict": [{"a": Value("int16"), "b": Value("int16")}],
        "sequence_dict": Sequence({"a": Value("int16"), "b": Value("int16")}),
    })
)
```
Other types of features also seem to be nullable (but I haven't checked all of them).

Version of `datasets` is the latest atm (2.18.0)


Is this an expected behavior or a bug?