scverse_misc.datasets.Loader

scverse_misc.datasets.Loader#

class scverse_misc.datasets.Loader(*args, **kwargs)#

Function that can be annotated by register_loader().

Methods#

Loader.__call__(entry, target, download, /, **kwargs)#

Call download (see DownloadCB) and load entry.

Parameters:
  • entry (DatasetEntry) – File to download.

  • target (Path) – Loaded when it exists, otherwise it will be created.

  • download (DownloadCB) – Called when target doesn’t exist.

  • kwargs (object) – Passed to download.

Return type:

TypeVar(T)