Troubleshoot ontology induction
This topic lists problems that you can have when you induce, edit, or publish an ontology. For each problem, it gives the cause and what to do.
An induction doesn’t start
AWS Context checks your request before it starts the induction. If a check fails, StartOntologyInduction fails, and no induction starts. The exception tells you what to fix:
-
ServiceQuotaExceededException– A quota stops the request. For information about the quotas, see StartOntologyInduction request fields. It has one of the following causes:-
Your account already has as many inductions in progress as its quota allows. Start the induction again when one of your other inductions ends. If you no longer need an induction that is running, cancel it. A canceled induction stops counting toward the quota. For more information, see Cancel an induction.
-
Your account’s ontologies and its inductions in progress together are at the ontology quota. The exception’s resource type is
ontology. Delete an ontology that you no longer need, or cancel an induction that you no longer need. For information about how to delete an ontology, see Delete an ontology. -
tagsorontologyTagshas more than 50 user tags. The message names the map. Send fewer tags.
-
-
ValidationException– An input breaks a rule or a limit, or AWS Context can’t use the template ontology. Check your inputs against theStartOntologyInductionrequest fields, Input limits, and Template ontology errors. If a document’s bytes aren’t a real document of its content type, thefieldListnames that document’scontent. A document with no content type, or with a content type that isn’t one of the nine types, gives an exception with only a message. You also get this exception when you use a client token again with a different request. For a different request, use a new token. -
ConflictException– The request can’t run as sent. It has one of the following causes:-
You sent the same request with the token of an induction or ontology that was deleted. To induce again, use a new token.
-
Other requests changed your account’s inductions in progress at the same time. Nothing started. Send the request again.
-
-
ThrottlingException– The request was throttled, or an earlier send of the same request might still be in progress. Send the same request again with the sameclientToken. AWS SDKs do this for you. A retry with the same token returns the induction of the first send. -
ResourceNotFoundException– The template ontology doesn’t exist. Check its ID or ARN. -
AccessDeniedException– You don’t have a permission that the request needs, such as permission to read the template ontology. For information about the permissions, see Before you begin.
The console doesn’t accept a file
On the AWS Context console, you can upload only files whose names end in .pdf, .txt, .md, .markdown, .csv, .json, .yaml, .yml, .doc, .dot, .docx, .html, .htm, .xhtml, or .xht. You can upload up to 100 files and 10 MiB in total. The console also refuses an empty file, and a plain text, Markdown, CSV, JSON, or YAML file that isn’t UTF-8 text or holds a NUL character. To send a Word document with macros (.docm), save it as .docx without macros first. For more information, see Choose documents.
An induction takes a long time
The status doesn’t show progress while an induction runs. On the console, the message Generation is taking longer than expected appears after 30 minutes. An induction that doesn’t finish within 6 hours fails with the code TIMED_OUT.
You can wait for the induction to end. If you no longer need it, cancel it.
An induction fails
A failed induction doesn’t create an ontology. To fix it, do the following:
-
Get the failure code. The console shows the message but not the code. To get both, call
GetOntologyInduction. For more information, see Check the status of an induction. -
Find the code in Failure codes, and do what the table says.
-
Start a new induction. If you use the API, use a new client token.
The draft is missing terms
AWS Context doesn’t report which documents it skipped or which terms it removed. A class, attribute, or relationship that you expected can be missing for one of the following reasons:
-
AWS Context skipped a document because it can’t read it, such as a damaged document.
-
The text is in an image, in an embedded document or attachment, or after the first 2,000,000 characters of a document. AWS Context doesn’t read this text.
-
AWS Context removed induced terms to keep the draft within its size limits. It removes first the terms that the fewest documents gave.
-
A class had more than 49 fields. AWS Context removed some of its induced fields, or an induced parent-class link. For more information, see Size limits and removed terms.
To fix the draft, add the missing terms when you edit it. For more information, see Edit a draft ontology. You can also fix your documents and start a new induction. In the new induction, you can use the prompt to name the concepts to focus on. For more information, see Choose documents, a template ontology, and a prompt.
The draft has warnings
On the console, the induction’s page shows Generation finished with warnings. With the API, GetOntology returns the warnings in validationIssues. Warnings don’t stop a save or a publish, but review them before you publish. For more information, see Review warnings.
You can’t save your edits
Each time you save, AWS Context checks the whole draft. A save can fail for one of the following reasons:
-
The checks found errors. With the API, the call fails with a
ValidationException, and the draft doesn’t change. Fix the errors, and save again. For more information, see Fix errors. -
Someone else saved the draft after you read it. With the API, the call fails with a
ConflictException. Read the draft again withGetOntology, make your change again, and save it. -
The ontology isn’t a draft. You can edit an ontology only while its status is
DRAFT. -
On the console, the change would go past 128 classes, 2,000 properties, or 49 fields per class. The console doesn’t let you go past these limits.
You can’t publish the draft
When you publish, AWS Context checks the draft again. If the checks find errors, the call fails with a ValidationException, and the ontology stays DRAFT. Fix the errors, save the draft, and publish again.
If the call fails with a ConflictException, the ontology doesn’t change. For each cause of a conflict and what to do, see If publishing fails.