admin管理员组文章数量:1389783
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 .
本文标签: How to download only a file from azure job results using Azure ML SDKStack Overflow
版权声明:本文标题:How to download only a file from azure job results using Azure ML SDK? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744741275a2622620.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论