Skip to content

OntologyInductionFailure

Source code in docs_src/capo_context/types/ontology_induction_failure.py
class OntologyInductionFailure(TypedDict, closed=True):
    code: "capo_context.types.ontology_induction_failure_code_string.OntologyInductionFailureCodeString"
    """<p>A code that identifies why the induction failed. Codes include the following:</p> <ul> <li> <p> <code>INPUT_UNREADABLE</code> - AWS Context couldn't read an uploaded document.</p> </li> <li> <p> <code>TOO_MANY_DOCUMENTS</code> - The request has more documents than one induction accepts.</p> </li> <li> <p> <code>SEED_INVALID</code> - The seed ontology's source document was deleted, is larger than 400,000 bytes, or doesn't parse.</p> </li> <li> <p> <code>FRAGMENT_EMPTY</code> - The induction found nothing to induce in the documents, and there is no seed to start from.</p> </li> <li> <p> <code>FRAGMENT_FAILED</code> - Inducing from a document failed after retries.</p> </li> <li> <p> <code>DOCUMENT_FILTERED</code> - The model that drafts the ontology refused to process a document.</p> </li> <li> <p> <code>MERGE_FAILED</code> - Merging the results from the documents failed after retries.</p> </li> <li> <p> <code>INDUCED_TOO_LARGE</code> - The draft is larger than the maximum size of an ontology.</p> </li> <li> <p> <code>DRAFT_WRITE_FAILED</code> - AWS Context couldn't save the draft.</p> </li> <li> <p> <code>TIMED_OUT</code> - The induction didn't finish within its time limit.</p> </li> <li> <p> <code>RUN_STOPPED</code> - The run stopped before it finished.</p> </li> </ul> <p>If AWS Context rejects the induced draft, <code>code</code> is the code that CreateOntology reports for the same problem (see <code>OntologyIssueCode</code>), for example <code>RDF_PARSE_ERROR</code> or <code>NO_CLASSES</code>.</p> <p>For <code>INPUT_UNREADABLE</code>, <code>TOO_MANY_DOCUMENTS</code>, <code>SEED_INVALID</code>, <code>FRAGMENT_EMPTY</code>, <code>DOCUMENT_FILTERED</code>, and <code>INDUCED_TOO_LARGE</code>, fix the input, and then start a new induction. For the other codes, start a new induction with the same input. New codes can be added, so handle a code that you don't recognize. Use <code>code</code>, not <code>message</code>, to decide how to respond.</p>"""
    message: "capo_context.types.ontology_induction_failure_message.OntologyInductionFailureMessage"
    """<p>A human-readable description of why the induction failed. Use <code>code</code>, not <code>message</code>, to decide how to respond.</p>"""

code instance-attribute

A code that identifies why the induction failed. Codes include the following:

  • INPUT_UNREADABLE - AWS Context couldn't read an uploaded document.

  • TOO_MANY_DOCUMENTS - The request has more documents than one induction accepts.

  • SEED_INVALID - The seed ontology's source document was deleted, is larger than 400,000 bytes, or doesn't parse.

  • FRAGMENT_EMPTY - The induction found nothing to induce in the documents, and there is no seed to start from.

  • FRAGMENT_FAILED - Inducing from a document failed after retries.

  • DOCUMENT_FILTERED - The model that drafts the ontology refused to process a document.

  • MERGE_FAILED - Merging the results from the documents failed after retries.

  • INDUCED_TOO_LARGE - The draft is larger than the maximum size of an ontology.

  • DRAFT_WRITE_FAILED - AWS Context couldn't save the draft.

  • TIMED_OUT - The induction didn't finish within its time limit.

  • RUN_STOPPED - The run stopped before it finished.

If AWS Context rejects the induced draft, code is the code that CreateOntology reports for the same problem (see OntologyIssueCode), for example RDF_PARSE_ERROR or NO_CLASSES.

For INPUT_UNREADABLE, TOO_MANY_DOCUMENTS, SEED_INVALID, FRAGMENT_EMPTY, DOCUMENT_FILTERED, and INDUCED_TOO_LARGE, fix the input, and then start a new induction. For the other codes, start a new induction with the same input. New codes can be added, so handle a code that you don't recognize. Use code, not message, to decide how to respond.

message instance-attribute

A human-readable description of why the induction failed. Use code, not message, to decide how to respond.