dianna.utils.downloader

DIANNA file downloader.

Instructions for adding a new file:

There are three dictionaries defining the available files: one for models, one for labels, one for data. Each entry has the (output) filename as key, and a list with the URL and sha256 hash as value. The sha256 hash can be obtained locally with sha256sum <filename>. Alternatively, set the hash to None and download the file with the download function. the sha256 sum will be printed to the command line and can be inserted into this file. Do not forget to prefix it with sha256:

Functions

list_available_files()

Lists DIANNA-related model, data, and label files available for download.

download(file, file_type[, path])

Download a file.

Module Contents

dianna.utils.downloader.list_available_files()[source]

Lists DIANNA-related model, data, and label files available for download.

dianna.utils.downloader.download(file, file_type, path=pooch.os_cache('dianna'))[source]

Download a file.

Parameters:
  • file (str) – name of the file. Use list_available_files() to get an overview

  • file_type (str) – model, data, or label

  • path (str) – download directory (default: OS cache directory)

Returns:

Full path to downloaded file (str)