我有一个 AzureML 管道,可以定期训练和注册模型。每次运行都会创建注册模型的新版本。我的目标是每当有新版本可用时就重新部署模型。
在另一个脚本中,我部署已注册的模型并覆盖任何现有部署:
service = Model.deploy(
workspace=ws,
name=service_name,
models=[model],
inference_config=inference_config,
deployment_config=deployment_config,
deployment_target=compute_target,
overwrite=True
)
最初,我认为将部署包含在管道中是有意义的,但我不知道如何在管道步骤中引用工作区。
感谢您帮助我!
最佳答案
在管道步骤中,您可以通过以下方式访问工作区
:
run = Run.get_context()
ws = run.experiment.workspace
关于python - AzureML : Automatically update deployment when new version of model is available,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62433812/