首页 > 解决方案 > 在 aks 或 aci 中部署后如何编辑 Azure ML 条目或评分脚本文件

问题描述

**我已经在 aci 中部署了模型端点 1 个月,现在我想更改相同模型的入口脚本中的一些内容,那么我如何在不更改再端点的情况下做到这一点。?

我的条目脚本如下所示:**

SENTIMENT_THRESHOLDS = (0.4, 0.7)
SEQUENCE_LENGTH = 300
def run(data):
try:
    # Pick out the text property of the JSON request.
    # This expects a request in the form of {"text": "some text to score for sentiment"}
    data = json.loads(data)
    prediction = predict(data['text'])
    #Return prediction
    return prediction
except Exception as e:
    error = str(e)
    return error

**现在我想更改变量 SEQUENCE_LENGTH 并使用此条目脚本文件更新 restendpoint **

标签: azuremachine-learningazure-aksazure-machine-learning-serviceazure-container-instances

解决方案


要重新部署到 ACI,请在注册表中的 Docker 映像上使用 :latest 标签。如果您将映像重新部署到注册表并重新启动 ACI 到指针注册表,它将自动部署新版本/映像。

如果您只是尝试调试和重新部署,请在本地执行此操作请遵循以下文档。 https://docs.microsoft.com/en-us/azure/machine-learning/how-to-troubleshoot-deployment#debug-locally

使用 SDK 更新已部署的 Web 服务的文档。


推荐阅读