download_files_from_run_id

health_azure.download_files_from_run_id(run_id, output_folder, prefix='', workspace=None, workspace_config_path=None, validate_checksum=False)[source]

For a given Azure ML run id, first retrieve the Run, and then download all files, which optionally start with a given prefix. E.g. if the Run creates a folder called “outputs”, which you wish to download all files from, specify prefix=”outputs”. To download all files associated with the run, leave prefix empty.

If not running inside AML and neither a workspace nor the config file are provided, the code will try to locate a config.json file in any of the parent folders of the current working directory. If that succeeds, that config.json file will be used to instantiate the workspace.

If function is called in a distributed PyTorch training script, the files will only be downloaded once per node (i.e, all process where is_local_rank_zero() == True). All processes will exit this function once all downloads are completed.

Parameters
  • run_id (str) – The id of the Azure ML Run

  • output_folder (Path) – Local directory to which the Run files should be downloaded.

  • prefix (str) – Optional prefix to filter Run files by

  • workspace (Optional[Workspace]) – Optional Azure ML Workspace object

  • workspace_config_path (Optional[Path]) – Optional path to settings for Azure ML Workspace

  • validate_checksum (bool) – Whether to validate the content from HTTP response

Return type

None