【发布时间】:2021-12-26 21:54:36
【问题描述】:
我正在使用新的表单识别器工作室 (https://formrecognizer.appliedai.azure.com/studio/customform/projects) 使用 SDK Version="4.0.0-beta.2" 标记文件。训练模型的代码如下:
var buildModelOptions = new BuildModelOptions
{
Prefix = docType.SubFolderName,
ModelDescription = trainedModel.ModelDescription
};
BuildModelOperation operation = await _trainingClient
.StartBuildModelAsync(new Uri(_trainingDataSASUrl), trainedModel.ModelName, buildModelOptions);
Response<DocumentModel> operationResponse = await operation.WaitForCompletionAsync();
DocumentModel model = operationResponse.Value;
在方法 StartBuildModelAsync() 上不断出现如下错误:
Invalid request.
Status: 400 (Bad Request)
ErrorCode: InvalidRequest
Content:
{
"error": {
"code": "InvalidRequest",
"message": "Invalid request.",
"innererror": {
"code": "TrainingContentMissing",
"message": "Training data is missing: Could not find any training data at the given path."
}
}
}
在 BuildModelOptions.Prefix 中,我将值作为“cfs/Lease1015”传递,这是来自 blob 容器的路径,blob 容器 SAS url 在“_trainingDataSASUrl”中。在“cfs/Lease1015”下存在 blob 训练文件,并且前缀以正确的大小写指定。
【问题讨论】:
标签: form-recognizer