-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ArrayXD with None as leading dim incompatible with DatasetCardData #7243
Comments
It looks like def to_dict(self) -> Dict[str, Any]:
"""Converts CardData to a dict.
Returns:
`dict`: CardData represented as a dictionary ready to be dumped to a YAML
block for inclusion in a README.md file.
"""
data_dict = copy.deepcopy(self.__dict__)
self._to_dict(data_dict)
return _remove_none(data_dict) Would it be ok to remove |
I have actually no idea why none values are removed in model and dataset card data... 🙈 However, I'm not really in favor in making an exception only for lists. It would mean that tuples, sets and dicts are filtered but not lists, which is pretty inconsistent. |
let's do it for top level attributes yes |
I opened huggingface/huggingface_hub#2626 to address it :) |
thanks ! |
Describe the bug
Creating a dataset with ArrayXD features leads to errors when downloading from hub due to DatasetCardData removing the Nones
@lhoestq
Steps to reproduce the bug
Source of error appears to be DatasetCardData.to_dict invoking DatasetCardData._remove_none
Expected behavior
Should be possible to load datasets saved with shape None in leading dimension
Environment info
3.0.2 and latest huggingface_hub
The text was updated successfully, but these errors were encountered: