Download Files
At the end of my training script save some residuals to the output directory. I would like to download the programatically. It appears the download_file function may help but there is no documentation.
Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
- ID: c2464cc9-aef4-8929-142f-a1ce7ae69d78
- Version Independent ID: 7b46b2e5-965f-1a0e-7c35-686900196f6e
- Content: azureml.core.Run class - Azure Machine Learning Python
- Content Source: AzureML/docs-ref-autogen/azureml-core/azureml.core.Run(class).yml
- Service: machine-learning
- Sub-service: core
- GitHub Login: @j-martens
- Microsoft Alias: jmartens
Looks like you can feed in file names from run.get_file_names() but its unclear what the output of run.download_file(name) is.
Hello, apologies for the documentation issue. We added decorators recently and they clobbered our doc strings. They should be back in the next release.
Here is the current(unfortunately clobbered) doc string for download_files: """Download files from a given storage prefix (folder name) or the entire container if prefix is unspecified. :param prefix: the filepath prefix within the container from which to download all artifacts :type prefix: str :param output_directory: optional directory that all artifact paths use as a prefix :type output_directory: str :param output_paths: optional filepaths in which to store the downloaded artifacts. Should be unique and match length of paths. :type output_paths: [str] :param batch_size: number of files to download per batch :type batch_size: int """
run.download_files(prefix="outputs", output_directory=existing_dir) # should do the trick
All files would be written within existing_dir
Edit: Next release was actually yesterday, the doc strings are back. https://docs.microsoft.com/en-us/python/api/azureml-core/azureml.core.run(class)?view=azure-ml-py
Thanks!