How to load it from local?

#1
by hrimsky - opened

To download this from server is too slow

have you solve it?

have you solve it?

just change the url path in fill50k.py to the local path

(De)fusing org

You can clone the repository locally and load it.

Just provide a valid path to the local clone while calling load_dataset().

You can clone the repository locally and load it.

Just provide a valid path to the local clone while calling load_dataset().

Thanks, I have solved.

You can clone the repository locally and load it.

Just provide a valid path to the local clone while calling load_dataset().
Hi,
I clone this repository and then I got fill50kthis folder on the local. How can I load this folder from code, I tried to use dataset = datasets.load_from_disk('./fill50k').
However, it didn't work. I got the message "FileNotFoundError: Directory ./fill50k is neither a Dataset directory nor a DatasetDict directory".
How to solve this problem, thanks in advance.

You can clone the repository locally and load it.

Just provide a valid path to the local clone while calling load_dataset().
Hi,
I clone this repository and then I got fill50kthis folder on the local. How can I load this folder from code, I tried to use dataset = datasets.load_from_disk('./fill50k').
However, it didn't work. I got the message "FileNotFoundError: Directory ./fill50k is neither a Dataset directory nor a DatasetDict directory".
How to solve this problem, thanks in advance.

Hi, did you solve this? I have the same problem now...

hi,

Just modify these few things in fill50k.py, change it to your local path, remember to unzip the zip file.

def _split_generators(self, dl_manager):
        metadata_path = "path to jsonl"
        images_dir = "path to fill50k"
        conditioning_images_dir = "path to fill50k"

        return [
            datasets.SplitGenerator(
                name=datasets.Split.TRAIN,
                # These kwargs will be passed to _generate_examples
                gen_kwargs={
                    "metadata_path": metadata_path,
                    "images_dir": images_dir,
                    "conditioning_images_dir": conditioning_images_dir,
                },
            ),
        ]

hi,

Just modify these few things in fill50k.py, change it to your local path, remember to unzip the zip file.

def _split_generators(self, dl_manager):
        metadata_path = "path to jsonl"
        images_dir = "path to fill50k"
        conditioning_images_dir = "path to fill50k"

        return [
            datasets.SplitGenerator(
                name=datasets.Split.TRAIN,
                # These kwargs will be passed to _generate_examples
                gen_kwargs={
                    "metadata_path": metadata_path,
                    "images_dir": images_dir,
                    "conditioning_images_dir": conditioning_images_dir,
                },
            ),
        ]

Thanks! It works!

Sign up or log in to comment