MachineLearningNotebooks icon indicating copy to clipboard operation
MachineLearningNotebooks copied to clipboard

Download Files

Open zackdrescher opened this issue 7 years ago • 3 comments

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.

zackdrescher avatar Apr 08 '19 20:04 zackdrescher

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.

zackdrescher avatar Apr 08 '19 20:04 zackdrescher

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

eddiestudies avatar Apr 09 '19 15:04 eddiestudies

Thanks!

zackdrescher avatar Apr 09 '19 16:04 zackdrescher