Skip to main content
App version: 3.4.10

download_files()

Python package: neptune-fetcher

Dowloads files associated with the specified experiments and attributes.

Parameters

NameTypeDefaultDescription
experimentsUnion[str, Filter], optionalNoneSpecifies the experiments to filter the files by:
  • a string representing the experiment name, or
  • a Filter object.
If None, all experiments are considered.
attributesUnion[str, AttributeFilter], optionalNoneWithin the selected experiments, specifies the attributes to filter the files by: If None, all attributes are considered.
destinationstr, optionalNonePath to where the files should be downloaded. Can be relative or absolute.
If None, the files are downloaded to the current working directory (CWD).
contextContext, optionalNoneWhich project and API token to use for the fetching operation. Useful for switching projects.

Constructing the destination path

Files are downloaded to the following directory:

 <destination>/<experiment_name>/<attribute_path>/<file_name>

Note that:

  • The directory specified with the destination parameter requires write permissions.
  • If the experiment name or an attribute path includes slashes /, each element that follows the slash is treated as a subdirectory.
  • The directory and subdirectories are automatically created if they don't already exist.

Example

To download a results.csv file logged under the dataset/image_sample attribute path of the seabird-flying-skills experiment, use:

import neptune_fetcher.alpha as npt


npt.download_files(
experiments="seabird-flying-skills",
attributes="dataset/image_sample",
destination="/data/samples/images"
)

The file will be downloaded to the following directory:

/data/samples/images/seabird-flying-skills/dataset/image_sample/results.csv