0

我正在尝试关注 Azure 多元异常检测笔记本: https ://github.com/Azure-Samples/AnomalyDetector/blob/master/ipython-notebook/Multivariate%20API%20Demo%20Notebook.ipynb/?wt.mc_id=aiml -17954-sejuare

ENDPOINT = "[PlaceHolder].cognitiveservices.azure.com/anomalydetector/v1.1-preview"
HEADERS = {
     "Ocp-Apim-Subscription-Key": "[KEY PlaceHolder]"
 }

我用我的 anomalyDetectionResourceName 替换 [PlaceHolder] 导致:anomalydetectionresourcename.cognitiveservices.azure.com/anomalydetector/v1.1-preview/

然后我将异常检测资源密钥用于“[KEY PlaceHolder]”

然后我得到下面的错误

b'<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN""http://www.w3.org/TR/html4/strict.dtd">\r\n<HTML><HEAD><TITLE>Not Found</TITLE>\r\n<META HTTP-EQUIV="Content-Type" Content="text/html; charset=us-ascii"></HEAD>\r\n<BODY><h2>Not Found</h2>\r\n<hr><p>HTTP Error 404. The requested resource is not found.</p>\r\n</BODY></HTML>\r\n'

我有点难过。我应该使用不同的端点密钥吗?也许来自 APImanagment 资源?我需要在 http 字符串中包含资源位置吗?如果是在哪里?

4

1 回答 1

1

您的网址似乎不完整。查看您正在关注的笔记本,您需要将以下内容之一附加到它。

List models [GET] /multivariate/models
Train a model [POST] /multivariate/models
Get a model [GET] /multivariate/models/{model_id}
Delete a model [DELETE] /multivariate/models/{model_id}
Detect anomalies [POST] /multivariate/models/{model_id}/detect
Export a model [GET] /multivariate/models/{model_id}/export
Get detection result [GET] /multivariate/results/{result_id}

例子:

anomalydetectionresourcename.cognitiveservices.azure.com/anomalydetector/v1.1-preview/multivariate/models

于 2021-07-24T03:03:37.760 回答