Skip to content

Do not load dataset information at instanciation

Yoann Schneider requested to merge fix-image-downloader into main

Allows to instantiate an ImageDownloader outside the teklia-dan datasets download command.

To reproduce the previous issue

> from dan.datasets.download.images import ImageDownloader
> from pathlib import Path
> im = ImageDownloader(output=Path("/tmp"))
  File "/usr/local/lib/python3.10/dist-packages/dan/datasets/download/images.py", line 76, in __init__
    split_data["text"] for split_data in self.split[TRAIN_NAME].values()
KeyError: 'train'

Merge request reports

Loading