【发布时间】:2017-11-08 21:44:21
【问题描述】:
Batch 的 .NET 文档包含一种从池中的节点检索文件的方法:link python SDK 中的相应类没有任何方法。任务失败时返回 stderr.txt 文件的最佳方式是什么?
【问题讨论】:
标签: python azure azure-batch
Batch 的 .NET 文档包含一种从池中的节点检索文件的方法:link python SDK 中的相应类没有任何方法。任务失败时返回 stderr.txt 文件的最佳方式是什么?
【问题讨论】:
标签: python azure azure-batch
我认为你可以通过使用 python batch_client 来做到这一点,我在这里找到了一个实现:https://github.com/Azure/azure-sdk-for-python/blob/master/doc/batch.rst
# Download task output
with open('task_output.txt', 'w') as file_output:
output = batch_client.file.get_from_task(
'python_test_job',
'python_task_1',
'stdout.txt'
)
for data in output:
file_output.write(data)
【讨论】: