求助:无法下载导出的Azure CLU训练模型用于Docker容器部署
问题:Azure CLU模型导出后无法获取下载链接,无法用于Docker容器部署
我在Azure Language Studio中有一个Conversational Language Understanding (CLU)项目,计划在Windows上通过Docker容器运行。按照官方步骤导出训练完成的模型后,既没有收到响应内容,也没有触发文件下载,仅得到无错误的空响应。
模型下载是后续容器部署的必要环节,需要提供本地模型路径{LOCAL_MODEL_DIRECTORY}挂载到容器中。我尝试过使用curl和PowerShell的Invoke-WebRequest发起请求,均返回StatusCode: 202和StatusDescription: Accepted,说明请求已被系统接收处理。随后我向响应头中的operation-location地址发送GET请求查询任务状态,结果仅显示任务成功,但未找到任何指向模型文件的下载链接:
(base) PS C:\Users\username> $response = Invoke-WebRequest -Uri $operationLocation -Headers $headers -Method GET (base) PS C:\Users\username> $response.Content {"jobId":"37cf73c4-6575-4b0f-a3b9-ec2daff4b0f2_638765568000000000","createdDateTime":"2025-03-03T11:34:05Z","lastUpdatedDateTime":"2025-03-03T11:34:07Z","expirationDateTime":"2025-03-10T11:34:05Z","status":"succeeded"}
编辑补充:以下是verbose模式下curl命令的输出:
zoddobbe@AJG9L74 ~ % curl -v --location --request PUT 'https://resourcename.cognitiveservices.azure.com/language/authoring/analyze-conversations/projects/project_name/exported-models/test_export?api-version=2024-11-15-preview' --header 'Ocp-Apim-Subscription-Key: xxxxxxxxxxxxxxxxxxxxxxxxx' --header 'Content-Type: application/json' --data-raw '{ "TrainedModelLabel": "clu-15" }' * Host resourcename.cognitiveservices.azure.com:443 was resolved. * IPv6: (none) * IPv4: 20.61.99.32 * Trying 20.61.99.32:443... * Connected to resourcename.cognitiveservices.azure.com (20.61.99.32) port 443 * ALPN: curl offers h2,http/1.1 * (304) (OUT), TLS handshake, Client hello (1): * CAfile: /etc/ssl/cert.pem * CApath: none * (304) (IN), TLS handshake, Server hello (2): * (304) (OUT), TLS handshake, Client hello (1): * (304) (IN), TLS handshake, Server hello (2): * (304) (IN), TLS handshake, Unknown (8): * (304) (IN), TLS handshake, Certificate (11): * (304) (IN), TLS handshake, CERT verify (15): * (304) (IN), TLS handshake, Finished (20): * (304) (OUT), TLS handshake, Finished (20): * SSL connection using TLSv1.3 / AEAD-AES256-GCM-SHA384 / [blank] / UNDEF * ALPN: server accepted h2 * Server certificate: * subject: C=US; ST=WA; L=Redmond; O=Microsoft Corporation; CN=westeurope.api.cognitive.microsoft.com * start date: Jan 23 09:19:16 2025 GMT * expire date: Jul 22 09:19:16 2025 GMT * subjectAltName: host "resourcename.cognitiveservices.azure.com" matched cert's "*.cognitiveservices.azure.com" * issuer: C=US; O=Microsoft Corporation; CN=Microsoft Azure RSA TLS Issuing CA 04 * SSL certificate verify ok. * using HTTP/2 * [HTTP/2] [1] OPENED stream for https://resourcename.cognitiveservices.azure.com/language/authoring/analyze-conversations/projects/project_name/exported-models/test_export?api-version=2024-11-15-preview * [HTTP/2] [1] [:method: PUT] * [HTTP/2] [1] [:scheme: https] * [HTTP/2] [1] [:authority: resourcename.cognitiveservices.azure.com] * [HTTP/2] [1] [:path: /language/authoring/analyze-conversations/projects/project_name/exported-models/test_export?api-version=2024-11-15-preview] * [HTTP/2] [1] [user-agent: curl/8.7.1] * [HTTP/2] [1] [accept: */*] * [HTTP/2] [1] [ocp-apim-subscription-key: xxxxxxxxxxxxxxxxxxxxxxxx] * [HTTP/2] [1] [content-type: application/json] * [HTTP/2] [1] [content-length: 33] > PUT /language/authoring/analyze-conversations/projects/project_name/exported-models/test_export?api-version=2024-11-15-preview HTTP/2 > Host: resourcename.cognitiveservices.azure.com > User-Agent: curl/8.7.1 > Accept: */* > Ocp-Apim-Subscription-Key: xxxxxxxxxxxxxxxxxxxxxxxx > Content-Type: application/json > Content-Length: 33 > * upload completely sent off: 33 bytes < HTTP/2 202 < content-length: 0 < access-control-expose-headers: * < request-id: 7762b3e2-994c-4be5-8f84-7ad3a91e08a0 < apim-request-id: 7762b3e2-994c-4be5-8f84-7ad3a91e08a0 < operation-location: https://resourcename.cognitiveservices.azure.com/language/authoring/analyze-conversations/projects/project_name/exported-models/test_export/jobs/2e4a4b41-ee12-4ae9-a290-160cc0850638_638765568000000000?api-version=2024-11-15-preview < x-envoy-upstream-service-time: 176 < strict-transport-security: max-age=31536000; includeSubDomains; preload < x-content-type-options: nosniff < x-ms-region: West Europe < date: Mon, 03 Mar 2025 16:49:16 GMT < * Connection #0 to host resourcename.cognitiveservices.azure.com left intact
内容的提问来源于stack exchange,提问作者ATH
相关产品推荐
相关产品推荐

