Hi,
I’m trying to fine tune a processor in documentsAI. When hitting the create new version button, the process starts and ends with an error. I’m encountering the following infamous error :
“error”: {
“code”: 13,
“message”: “Internal error encountered.”,
“details”:
}
After digging into the Log Explorer it seems that my training file is too large and makes the process fail (see error below)
{
“protoPayload”: {
“@type”: “type.googleapis.com/google.cloud.audit.AuditLog”,
“status”: {
“code”: 3,
“message”: “Media file size cannot exceed 20971520 bytes. Actual size is 21608688 bytes. File: gs://xx-training/xx/xx/scratch/image_uris/xx/chunk_1”
},
“authenticationInfo”: {
“principalEmail”: “myemail@mail.fr”
},
“requestMetadata”: {
“requestAttributes”: {},
“destinationAttributes”: {}
},
“serviceName”: “documentai.googleapis.com”,
“methodName”: “google.cloud.documentai.uiv1beta3.DocumentProcessorService.TrainProcessorVersion”,
“resourceName”: “projects/xx/locations/eu/processors/xx/processorVersions/xx”
},
“insertId”: “hhbldtc1gd”,
“resource”: {
“type”: “audited_resource”,
“labels”: {
“project_id”: “xx”,
“service”: “documentai.googleapis.com”,
“method”: “google.cloud.documentai.uiv1beta3.DocumentProcessorService.TrainProcessorVersion”
}
},
“timestamp”: “2025-04-22T13:41:35.890474349Z”,
“severity”: “ERROR”,
“logName”: “projects/xx/logs/cloudaudit.googleapis.com%2Factivity”,
“operation”: {
“id”: “projects/xx/locations/eu/operations/xx”,
“producer”: “documentai.googleapis.com”,
“last”: true
},
“receiveTimestamp”: “2025-04-22T13:41:37.059774963Z”
}
I have two issues with that :
1/ None of my training files have such a size, the max image size is 5Mo not 20Mo. I guess documents AI is adding some data to process it, but it’d be nice to automatically reject files that are too big right after labeling in the dataset management view instead of when training a new version.
2/ There’s no way for me to identify which file in my dataset is causing the training failure, because there’s no match between the documentId that caused the error and the documentId in my dataset. I tried to play with those two endpoints dataset.listDocuments and dataset.getDocument to see if I could match those, but unfortunately no.
Any help know how to identify which file I should remove from my dataset, so I can train a new processor version, would be highly appreciated.
Regards,
Laurent