I want to download only "file_test.txt" file, but nothing although the code runs nothing is downloaded:
download_path = "./downloaded_outputs"
os.makedirs(download_path, exist_ok=True)
teste = ml_client.jobs.download(
name=returned_job.name,
download_path="./downloaded_outputs",
output_name="output_data/file_test.txt"
)
However, if I do output_name="output_data"
the full content output_data folder is downloaded:
download_path = "./downloaded_outputs"
os.makedirs(download_path, exist_ok=True)
teste = ml_client.jobs.download(
name=returned_job.name,
download_path="./downloaded_outputs",
output_name="output_data"
)
I'm using AzureML SDK v2
I want to download only "file_test.txt" file, but nothing although the code runs nothing is downloaded:
download_path = "./downloaded_outputs"
os.makedirs(download_path, exist_ok=True)
teste = ml_client.jobs.download(
name=returned_job.name,
download_path="./downloaded_outputs",
output_name="output_data/file_test.txt"
)
However, if I do output_name="output_data"
the full content output_data folder is downloaded:
download_path = "./downloaded_outputs"
os.makedirs(download_path, exist_ok=True)
teste = ml_client.jobs.download(
name=returned_job.name,
download_path="./downloaded_outputs",
output_name="output_data"
)
I'm using AzureML SDK v2
Share Improve this question asked Mar 12 at 16:14 MiguelMiguel 3,0645 gold badges39 silver badges58 bronze badges 1- i guess you can not download a single file. you download all output_data file and filter it. – JayashankarGS Commented Mar 20 at 10:22
1 Answer
Reset to default 0As per this documentation the output name should be the user defined output in jobs.
It should be the key in the outputs dictionary of a job.
If you view the details of job you can see the keys in outputs
dictionary like below.
So, whatever the keys present in your job outputs you can give only those as output name while download.
In your case to get only particular file, you can use fsspec
library where you need pass output path from job object to AzureMachineLearningFileSystem
, check more about using fsspec
here .