gpt4 book ai didi

azure-machine-learning-workbench - 在本地运行 Azure 机器学习服务管道

转载 作者:行者123 更新时间:2023-12-04 01:48:42 24 4
gpt4 key购买 nike

我将 Azure 机器学习服务与 azureml-sdk python 库一起使用。

我正在使用 azureml.core 版本 1.0.8

我正在关注这个 https://docs.microsoft.com/en-us/azure/machine-learning/service/how-to-create-your-first-pipeline教程。

当我使用 Azure 计算资源时,它可以正常工作。但我想在本地运行它。

我收到以下错误

raise ErrorResponseException(self._deserialize, response)
azureml.pipeline.core._restclients.aeva.models.error_response.ErrorResponseException: (BadRequest) Response status code does not indicate success: 400 (Bad Request).
Trace id: [uuid], message: Can't build command text for [train.py], moduleId [uuid] executionId [id]: Assignment for parameter Target is not specified

我的代码看起来像:
run_config = RunConfiguration()
compute_target = LocalTarget()
run_config.target = LocalTarget()
run_config.environment.python.conda_dependencies = CondaDependencies(conda_dependencies_file_path='environment.yml')
run_config.environment.python.interpreter_path = 'C:/Projects/aml_test/.conda/envs/aml_test_env/python.exe'
run_config.environment.python.user_managed_dependencies = True
run_config.environment.docker.enabled = False

trainStep = PythonScriptStep(
script_name="train.py",
compute_target=compute_target,
source_directory='.',
allow_reuse=False,
runconfig=run_config
)

steps = [trainStep]

# Build the pipeline
pipeline = Pipeline(workspace=ws, steps=[steps])
pipeline.validate()

experiment = Experiment(ws, 'Test')

# Fails, locally, works on Azure Compute
run = experiment.submit(pipeline)


# Works both locally and on Azure Compute
src = ScriptRunConfig(source_directory='.', script='train.py', run_config=run_config)
run = experiment.submit(src)
train.py是一个非常简单的自包含脚本,仅依赖于近似 pi 的 numpy。

最佳答案

本地计算不能与 ML Pipelines 一起使用。请看这个article .

关于azure-machine-learning-workbench - 在本地运行 Azure 机器学习服务管道,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54254830/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com