download_files()
Downloads files from the specified Neptune experiments or runs.
Parameters
note
The Neptune project isn't specified directly for the function call, because the project is encoded in the files
argument.
For how to set the project manually, see the example.
Returns
DataFrame mapping experiments and attributes to the paths of downloaded files.
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
Specify files from a given step range of a series:
import neptune_query as nq
interesting_files = nq.fetch_series(
project="team-alpha/project-x",
experiments=["seagull-week1", "seagull-week2"],
attributes=r"^predictions/",
step_range=(2050.0, 2056.0),
)
nq.download_files(files=interesting_files)
Download from runs
To target individual runs by ID instead of experiment name, import the runs API:
import neptune_query.runs as nq_runs
Then call the corresponding querying method and replace the experiments
parameter with runs
:
interesting_files = nq_runs.fetch_series(
project="team-alpha/project-x",
runs=["prompt-wolf-20250605132116671-2g2r1"], # run ID
attributes=r"^predictions/",
step_range=(2050.0, 2056.0),
)
nq_runs.download_files(files=interesting_files)