Dataset Viewer issue
#1
by
mrdbourke
- opened
Hey there, I'm not sure what I'm doing wrong here.
It seems the dataset viewer is not working.
I'm following the tutorial here: https://huggingface.co/docs/datasets/image_dataset#loading-script
As well as the examples here:
- https://huggingface.co/datasets/food101/blob/main/food101.py
- https://github.com/huggingface/datasets/blob/main/templates/new_dataset_script.py
All files should be visible in the repo.
Error details:
Error code: SplitsNamesError
Exception: TypeError
Message: can only concatenate str (not "int") to str
Traceback: Traceback (most recent call last):
File "/src/workers/splits/src/splits/response.py", line 127, in compute_splits_response
split_full_names = get_dataset_split_full_names(dataset=dataset, use_auth_token=use_auth_token)
File "/src/workers/splits/src/splits/response.py", line 55, in get_dataset_split_full_names
return [
File "/src/workers/splits/src/splits/response.py", line 58, in <listcomp>
for split in get_dataset_split_names(path=dataset, config_name=config, use_auth_token=use_auth_token)
File "/src/workers/splits/.venv/lib/python3.9/site-packages/datasets/inspect.py", line 426, in get_dataset_split_names
info = get_dataset_config_info(
File "/src/workers/splits/.venv/lib/python3.9/site-packages/datasets/inspect.py", line 355, in get_dataset_config_info
builder = load_dataset_builder(
File "/src/workers/splits/.venv/lib/python3.9/site-packages/datasets/load.py", line 1523, in load_dataset_builder
builder_instance: DatasetBuilder = builder_cls(
File "/src/workers/splits/.venv/lib/python3.9/site-packages/datasets/builder.py", line 1292, in __init__
super().__init__(*args, **kwargs)
File "/src/workers/splits/.venv/lib/python3.9/site-packages/datasets/builder.py", line 312, in __init__
info = self.get_exported_dataset_info()
File "/src/workers/splits/.venv/lib/python3.9/site-packages/datasets/builder.py", line 412, in get_exported_dataset_info
return self.get_all_exported_dataset_infos().get(self.config.name, DatasetInfo())
File "/src/workers/splits/.venv/lib/python3.9/site-packages/datasets/builder.py", line 398, in get_all_exported_dataset_infos
return DatasetInfosDict.from_directory(cls.get_imported_module_dir())
File "/src/workers/splits/.venv/lib/python3.9/site-packages/datasets/info.py", line 370, in from_directory
return cls.from_metadata(dataset_metadata)
File "/src/workers/splits/.venv/lib/python3.9/site-packages/datasets/info.py", line 396, in from_metadata
dataset_info = DatasetInfo._from_yaml_dict(dataset_metadata["dataset_info"])
File "/src/workers/splits/.venv/lib/python3.9/site-packages/datasets/info.py", line 332, in _from_yaml_dict
yaml_data["features"] = Features._from_yaml_list(yaml_data["features"])
File "/src/workers/splits/.venv/lib/python3.9/site-packages/datasets/features/features.py", line 1745, in _from_yaml_list
return cls.from_dict(from_yaml_inner(yaml_data))
File "/src/workers/splits/.venv/lib/python3.9/site-packages/datasets/features/features.py", line 1741, in from_yaml_inner
return {name: from_yaml_inner(_feature) for name, _feature in zip(names, obj)}
File "/src/workers/splits/.venv/lib/python3.9/site-packages/datasets/features/features.py", line 1741, in <dictcomp>
return {name: from_yaml_inner(_feature) for name, _feature in zip(names, obj)}
File "/src/workers/splits/.venv/lib/python3.9/site-packages/datasets/features/features.py", line 1736, in from_yaml_inner
return from_yaml_inner(obj["dtype"])
File "/src/workers/splits/.venv/lib/python3.9/site-packages/datasets/features/features.py", line 1738, in from_yaml_inner
return {"_type": snakecase_to_camelcase(_type), **unsimplify(obj)[_type]}
File "/src/workers/splits/.venv/lib/python3.9/site-packages/datasets/features/features.py", line 1706, in unsimplify
if label_ids and label_ids != list(range(label_ids[-1] + 1)):
TypeError: can only concatenate str (not "int") to str
Any help would be greatly appreciated!
This has been fixed in datasets
2.7.1 - can you update the datasets
version in the viewer
@severo
?
Thank you!
mrdbourke
changed discussion status to
closed