Error while cloning repository
Hi everyone,I’m encountering an issue while trying to build my project. It’s failing with a very minimal error message:Build Log:===== Build Queued at 2024-11-06 07:46:28 / Commit SHA:b439bbc=====“Error while cloning repository”I can’t find any more error logs.Here’s my questions:Could this be related to the number/size of image files? I uploaded many image files to my space.If it is, how can I upload numbers of image files to my space?Any guidance on resolving this issue or best practices for uploads would be greatly appreciated.Here’s the link of my space.huggingface.coBIORD - a Hugging Face Space by hangunwoo07BIORD Webpage ProjectThanks in advance!
2024-11-06T08:54:42Z
To put it briefly, the problem you are encountering is probably a temporary bug in HF. The workaround is to put the data in the model repo or dataset repo, and put the programs in Spaces. If it’s just an image, there shouldn’t be a problem, but if it’s too much, it might not be the case.Build error: Error while cloning repositorySpacesI’ve attempted to restart and perform a factory build multiple times, yet the build error persists. I’ve also researched and tried solutions from similar issues, but to no avail.[image]Space link:Image Matching Webui - a Hugging Face Space by RealcatThanks for your help:)
2024-11-06T09:38:12Z
Is tgz file available to my dataset? It would be much easier to upload my whole image files if it’s okay.
2024-11-06T09:43:32Z
Even free users can upload files of up to 50GB per file and 300GB per repo (actually, you can go even higher, but that’s the nominal limit), and you can upload as many repos as you like. Of course, you can also upload tgz files.The problem is whether or not it’s easy to handle from the HF dataset library, etc., but please refer to the following for that.huggingface.coImage DatasetWe’re on a journey to advance and democratize artificial intelligence through open source and open science.huggingface.coWebDatasetWe’re on a journey to advance and democratize artificial intelligence through open source and open science.If you don’t mind, just upload it.
2024-11-06T11:01:47Z
Sorry if this question is off topic, but I’m having trouble loading a dataset into my project. This is the container log.===== Application Startup at 2024-11-06 10:51:02 =====

Traceback (most recent call last):
  File "/home/user/app/app.py", line 16, in <module>
    dataset = load_dataset("imagefolder", data_dir="hangunwoo07/Naturing_Bird_Data/bird_data_naturing.tgz")
  File "/usr/local/lib/python3.10/site-packages/datasets/load.py", line 2132, in load_dataset
    builder_instance = load_dataset_builder(
  File "/usr/local/lib/python3.10/site-packages/datasets/load.py", line 1853, in load_dataset_builder
    dataset_module = dataset_module_factory(
  File "/usr/local/lib/python3.10/site-packages/datasets/load.py", line 1562, in dataset_module_factory
    ).get_module()
  File "/usr/local/lib/python3.10/site-packages/datasets/load.py", line 940, in get_module
    else get_data_patterns(base_path, download_config=self.download_config)
  File "/usr/local/lib/python3.10/site-packages/datasets/data_files.py", line 503, in get_data_patterns
    raise EmptyDatasetError(f"The directory at {base_path} doesn't contain any data files") from None
datasets.data_files.EmptyDatasetError: The directory at /home/user/app/hangunwoo07/Naturing_Bird_Data/bird_data_naturing.tgz doesn't contain any data files
Traceback (most recent call last):
  File "/home/user/app/app.py", line 16, in <module>
    dataset = load_dataset("imagefolder", data_dir="hangunwoo07/Naturing_Bird_Data/bird_data_naturing.tgz")
  File "/usr/local/lib/python3.10/site-packages/datasets/load.py", line 2132, in load_dataset
    builder_instance = load_dataset_builder(
  File "/usr/local/lib/python3.10/site-packages/datasets/load.py", line 1853, in load_dataset_builder
    dataset_module = dataset_module_factory(
  File "/usr/local/lib/python3.10/site-packages/datasets/load.py", line 1562, in dataset_module_factory
    ).get_module()
  File "/usr/local/lib/python3.10/site-packages/datasets/load.py", line 940, in get_module
    else get_data_patterns(base_path, download_config=self.download_config)
  File "/usr/local/lib/python3.10/site-packages/datasets/data_files.py", line 503, in get_data_patterns
    raise EmptyDatasetError(f"The directory at {base_path} doesn't contain any data files") from None
datasets.data_files.EmptyDatasetError: The directory at /home/user/app/hangunwoo07/Naturing_Bird_Data/bird_data_naturing.tgz doesn't contain any data filesI’m trying to load dataset like this:dataset = load_dataset("imagefolder", data_dir="hangunwoo07/Naturing_Bird_Data/bird_data_naturing.tgz")

def get_image_from_dataset(bird_name, image_filename):
    try:
        image_path = f"naturing_bird_image/naturing_bird_image/{bird_name}/{image_filename}"
        image_data = dataset[image_path]['image']

        if isinstance(image_data, Image.Image):
            img_byte_arr = io.BytesIO()
            image_data.save(img_byte_arr, format='JPEG')
            return img_byte_arr.getvalue()
        return image_data
        
    except Exception as e:
        print(f"Error accessing image from dataset: {e}")
        print(f"Attempted path: {image_path}")
        return NoneHow can I use dataset in my project?
2024-11-06T11:03:55Z
Maybe this? I think it’s not off-topic because it’s caused by an error on the HF side and we’re doing it to avoid it.github.com/huggingface/datasetsEmptyDatasetError: The directory at /metadata.jsonl doesn't contain any data filesopened03:08PM - 27 Jun 24 UTCclosed09:56AM - 28 Jun 24 UTCAki1991### Describe the bug

while trying to load custom dataset from jsonl file, I get…the error: "metadata.jsonl doesn't contain any data files"

### Steps to reproduce the bug

This is my [metadata_v2.jsonl](https://github.com/user-attachments/files/16016011/metadata_v2.json) file.  I have this file in the folder with all images mentioned in that json(l) file.

Through below mentioned command I am trying to load_dataset so that I can upload it as mentioned here on the [official website](https://huggingface.co/docs/datasets/en/image_dataset#upload-dataset-to-the-hub).

````
from datasets import load_dataset

dataset = load_dataset("imagefolder", data_dir="path/to/jsonl/metadata.jsonl")
````

error:

````
EmptyDatasetError                         Traceback (most recent call last)
Cell In[18], line 3
      1 from datasets import load_dataset
----> 3 dataset = load_dataset("imagefolder", 
      4                        data_dir="path/to/jsonl/file/metadata.jsonl")
      5 dataset[0]["objects"]

File ~/anaconda3/envs/lvis/lib/python3.11/site-packages/datasets/load.py:2594, in load_dataset(path, name, data_dir, data_files, split, cache_dir, features, download_config, download_mode, verification_mode, ignore_verifications, keep_in_memory, save_infos, revision, token, use_auth_token, task, streaming, num_proc, storage_options, trust_remote_code, **config_kwargs)
   2589 verification_mode = VerificationMode(
   2590     (verification_mode or VerificationMode.BASIC_CHECKS) if not save_infos else VerificationMode.ALL_CHECKS
   2591 )
   2593 # Create a dataset builder
-> 2594 builder_instance = load_dataset_builder(
   2595     path=path,
   2596     name=name,
   2597     data_dir=data_dir,
   2598     data_files=data_files,
   2599     cache_dir=cache_dir,
   2600     features=features,
   2601     download_config=download_config,
   2602     download_mode=download_mode,
   2603     revision=revision,
   2604     token=token,
   2605     storage_options=storage_options,
   2606     trust_remote_code=trust_remote_code,
   2607     _require_default_config_name=name is None,
   2608     **config_kwargs,
   2609 )
   2611 # Return iterable dataset in case of streaming
   2612 if streaming:

File ~/anaconda3/envs/lvis/lib/python3.11/site-packages/datasets/load.py:2266, in load_dataset_builder(path, name, data_dir, data_files, cache_dir, features, download_config, download_mode, revision, token, use_auth_token, storage_options, trust_remote_code, _require_default_config_name, **config_kwargs)
   2264     download_config = download_config.copy() if download_config else DownloadConfig()
   2265     download_config.storage_options.update(storage_options)
-> 2266 dataset_module = dataset_module_factory(
   2267     path,
   2268     revision=revision,
   2269     download_config=download_config,
   2270     download_mode=download_mode,
   2271     data_dir=data_dir,
   2272     data_files=data_files,
   2273     cache_dir=cache_dir,
   2274     trust_remote_code=trust_remote_code,
   2275     _require_default_config_name=_require_default_config_name,
   2276     _require_custom_configs=bool(config_kwargs),
   2277 )
   2278 # Get dataset builder class from the processing script
   2279 builder_kwargs = dataset_module.builder_kwargs

File ~/anaconda3/envs/lvis/lib/python3.11/site-packages/datasets/load.py:1805, in dataset_module_factory(path, revision, download_config, download_mode, dynamic_modules_path, data_dir, data_files, cache_dir, trust_remote_code, _require_default_config_name, _require_custom_configs, **download_kwargs)
   1782 # We have several ways to get a dataset builder:
   1783 #
   1784 # - if path is the name of a packaged dataset module
   (...)
   1796 
   1797 # Try packaged
   1798 if path in _PACKAGED_DATASETS_MODULES:
   1799     return PackagedDatasetModuleFactory(
   1800         path,
   1801         data_dir=data_dir,
   1802         data_files=data_files,
   1803         download_config=download_config,
   1804         download_mode=download_mode,
-> 1805     ).get_module()
   1806 # Try locally
   1807 elif path.endswith(filename):

File ~/anaconda3/envs/lvis/lib/python3.11/site-packages/datasets/load.py:1140, in PackagedDatasetModuleFactory.get_module(self)
   1135 def get_module(self) -> DatasetModule:
   1136     base_path = Path(self.data_dir or "").expanduser().resolve().as_posix()
   1137     patterns = (
   1138         sanitize_patterns(self.data_files)
   1139         if self.data_files is not None
-> 1140         else get_data_patterns(base_path, download_config=self.download_config)
   1141     )
   1142     data_files = DataFilesDict.from_patterns(
   1143         patterns,
   1144         download_config=self.download_config,
   1145         base_path=base_path,
   1146     )
   1147     supports_metadata = self.name in _MODULE_SUPPORTS_METADATA

File ~/anaconda3/envs/lvis/lib/python3.11/site-packages/datasets/data_files.py:503, in get_data_patterns(base_path, download_config)
    501     return _get_data_files_patterns(resolver)
    502 except FileNotFoundError:
--> 503     raise EmptyDatasetError(f"The directory at {base_path} doesn't contain any data files") from None

EmptyDatasetError: The directory at path/to/jsonl/file/metadata.jsonl doesn't contain any data files`
```

### Expected behavior

It should be able load the whole file in a format of "dataset" inside the dataset variable. But it gives error "The directory at "path/to/jsonl/metadata.jsonl" doesn't contain any data files."

### Environment info

I am using conda environment.Hi !data_dir=is for directories, can you try usingdata_files=instead ?