[英]Form Recognizer "Training data is missing: Could not find any training data at the given path."
I am using new form recognizer studio ( https://formrecognizer.appliedai.azure.com/studio/customform/projects ) to label files using SDK Version="4.0.0-beta.2". I am using new form recognizer studio ( https://formrecognizer.appliedai.azure.com/studio/customform/projects ) to label files using SDK Version="4.0.0-beta.2". Code to train model as below:
训练 model 的代码如下:
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;
Keep getting error like below on method StartBuildModelAsync():在方法 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."
}
}
}
In BuildModelOptions.Prefix, I am passing value as "cfs/Lease1015", which is path from blob container, blob containers SAS url is in "_trainingDataSASUrl".在 BuildModelOptions.Prefix 中,我将值作为“cfs/Lease1015”传递,这是来自 blob 容器的路径,blob 容器 SAS url 在“_trainingDataSASUrl”中。 In blob training files exist under "cfs/Lease1015" and prefix is specified in correct casing.
在“cfs/Lease1015”下存在 blob 训练文件,并且前缀以正确的大小写指定。
Please look at github bug reported here https://github.com/Azure/azure-sdk-for-net/issues/26081 for more information.请查看此处报告的 github 错误https://github.com/Azure/azure-sdk-for-net/issues/26081了解更多信息。
It worked after adding '/' to prefix attribute.将“/”添加到前缀属性后,它起作用了。
var buildModelOptions = new BuildModelOptions
{
Prefix = docType.SubFolderName + '/', // append a slash to the subfolder name
ModelDescription = trainedModel.ModelDescription
};
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.