====================================================================== ERROR: test_fine_tuned (tests.integration.test_clients.test_openai_client.TestCompletion) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/harry/ontogpt/tests/integration/test_clients/test_openai_client.py", line 221, in test_fine_tuned ann = client.complete(TUNED_TEST_PROMPT) File "/home/harry/ontogpt/src/ontogpt/clients/openai_client.py", line 74, in complete raise e File "/home/harry/ontogpt/src/ontogpt/clients/openai_client.py", line 53, in complete response = openai.ChatCompletion.create( File "/home/harry/ontogpt/.venv/lib/python3.9/site-packages/openai/api_resources/chat_completion.py", line 25, in create return super().create(*args, **kwargs) File "/home/harry/ontogpt/.venv/lib/python3.9/site-packages/openai/api_resources/abstract/engine_api_resource.py", line 153, in create response, _, api_key = requestor.request( File "/home/harry/ontogpt/.venv/lib/python3.9/site-packages/openai/api_requestor.py", line 298, in request resp, got_stream = self._interpret_response(result, stream) File "/home/harry/ontogpt/.venv/lib/python3.9/site-packages/openai/api_requestor.py", line 700, in _interpret_response self._interpret_response_line( File "/home/harry/ontogpt/.venv/lib/python3.9/site-packages/openai/api_requestor.py", line 765, in _interpret_response_line raise self.handle_error_response( openai.error.InvalidRequestError: This is not a chat model and thus not supported in the v1/chat/completions endpoint. Did you mean to use v1/completions? ====================================================================== ERROR: test_eval (tests.integration.test_evaluation.test_eval_ctd.TestCTD) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/harry/ontogpt/tests/integration/test_evaluation/test_eval_ctd.py", line 47, in test_eval eos = evaluator.eval() File "/home/harry/ontogpt/src/ontogpt/evaluation/ctd/eval_ctd.py", line 187, in eval docs = list(self.load_test_cases()) File "/home/harry/ontogpt/src/ontogpt/evaluation/ctd/eval_ctd.py", line 170, in load_cases yield ChemicalToDiseaseDocument(publication=pub, triples=triples) File "/home/harry/ontogpt/.venv/lib/python3.9/site-packages/pydantic/main.py", line 165, in __init__ __pydantic_self__.__pydantic_validator__.validate_python(data, self_instance=__pydantic_self__) pydantic_core._pydantic_core.ValidationError: 2 validation errors for ChemicalToDiseaseDocument publication Input should be a valid dictionary or instance of Publication [type=model_type, input_value=Publication(id=None, titl...xt=None, full_text=None), input_type=Publication] For further information visit https://errors.pydantic.dev/2.3/v/model_type triples.0 Input should be a valid dictionary or instance of ChemicalToDiseaseRelationship [type=model_type, input_value=Triple(subject='MESH:D015..., object_qualifier=None), input_type=Triple] For further information visit https://errors.pydantic.dev/2.3/v/model_type ====================================================================== ERROR: test_load_test_sets (tests.integration.test_evaluation.test_eval_ctd.TestCTD) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/harry/ontogpt/tests/integration/test_evaluation/test_eval_ctd.py", line 39, in test_load_test_sets docs = list(self.engine.load_test_cases()) File "/home/harry/ontogpt/src/ontogpt/evaluation/ctd/eval_ctd.py", line 170, in load_cases yield ChemicalToDiseaseDocument(publication=pub, triples=triples) File "/home/harry/ontogpt/.venv/lib/python3.9/site-packages/pydantic/main.py", line 165, in __init__ __pydantic_self__.__pydantic_validator__.validate_python(data, self_instance=__pydantic_self__) pydantic_core._pydantic_core.ValidationError: 2 validation errors for ChemicalToDiseaseDocument publication Input should be a valid dictionary or instance of Publication [type=model_type, input_value=Publication(id=None, titl...xt=None, full_text=None), input_type=Publication] For further information visit https://errors.pydantic.dev/2.3/v/model_type triples.0 Input should be a valid dictionary or instance of ChemicalToDiseaseRelationship [type=model_type, input_value=Triple(subject='MESH:D015..., object_qualifier=None), input_type=Triple] For further information visit https://errors.pydantic.dev/2.3/v/model_type ====================================================================== ERROR: tests.integration.test_evaluation.test_eval_drugmechdb (unittest.loader._FailedTest) ---------------------------------------------------------------------- ImportError: Failed to import test module: tests.integration.test_evaluation.test_eval_drugmechdb Traceback (most recent call last): File "/usr/lib/python3.9/unittest/loader.py", line 436, in _find_test_path module = self._get_module_from_name(name) File "/usr/lib/python3.9/unittest/loader.py", line 377, in _get_module_from_name __import__(name) File "/home/harry/ontogpt/tests/integration/test_evaluation/test_eval_drugmechdb.py", line 7, in from ontogpt.evaluation.drugmechdb.datamodel.drugmechdb import Graph, Mechanism File "/home/harry/ontogpt/src/ontogpt/evaluation/drugmechdb/datamodel/drugmechdb.py", line 18, in class ConfiguredBaseModel( File "/home/harry/ontogpt/.venv/lib/python3.9/site-packages/pydantic/_internal/_model_construction.py", line 123, in __new__ cls: type[BaseModel] = super().__new__(mcs, cls_name, bases, namespace, **kwargs) # type: ignore File "/usr/lib/python3.9/abc.py", line 106, in __new__ cls = super().__new__(mcls, name, bases, namespace, **kwargs) TypeError: ConfiguredBaseModel.__init_subclass__() takes no keyword arguments ====================================================================== ERROR: test_closure (tests.integration.test_evaluation.test_eval_enrichment.TestEvalEnrichment) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/harry/ontogpt/tests/integration/test_evaluation/test_eval_enrichment.py", line 356, in setUp self.evaluator = EvalEnrichment() File "", line 7, in __init__ File "/home/harry/ontogpt/src/ontogpt/evaluation/enrichment/eval_enrichment.py", line 100, in __post_init__ model = modelname["names"][0] TypeError: string indices must be integers ====================================================================== ERROR: test_full (tests.integration.test_evaluation.test_eval_enrichment.TestEvalEnrichment) Tests complete all by all comparisons. ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/harry/ontogpt/tests/integration/test_evaluation/test_eval_enrichment.py", line 356, in setUp self.evaluator = EvalEnrichment() File "", line 7, in __init__ File "/home/harry/ontogpt/src/ontogpt/evaluation/enrichment/eval_enrichment.py", line 100, in __post_init__ model = modelname["names"][0] TypeError: string indices must be integers ====================================================================== ERROR: test_full_mini (tests.integration.test_evaluation.test_eval_enrichment.TestEvalEnrichment) Tests complete all by all comparisons. ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/harry/ontogpt/tests/integration/test_evaluation/test_eval_enrichment.py", line 356, in setUp self.evaluator = EvalEnrichment() File "", line 7, in __init__ File "/home/harry/ontogpt/src/ontogpt/evaluation/enrichment/eval_enrichment.py", line 100, in __post_init__ model = modelname["names"][0] TypeError: string indices must be integers ====================================================================== ERROR: test_full_v2 (tests.integration.test_evaluation.test_eval_enrichment.TestEvalEnrichment) Tests complete all by all comparisons. ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/harry/ontogpt/tests/integration/test_evaluation/test_eval_enrichment.py", line 356, in setUp self.evaluator = EvalEnrichment() File "", line 7, in __init__ File "/home/harry/ontogpt/src/ontogpt/evaluation/enrichment/eval_enrichment.py", line 100, in __post_init__ model = modelname["names"][0] TypeError: string indices must be integers ====================================================================== ERROR: test_load (tests.integration.test_evaluation.test_eval_enrichment.TestEvalEnrichment) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/harry/ontogpt/tests/integration/test_evaluation/test_eval_enrichment.py", line 356, in setUp self.evaluator = EvalEnrichment() File "", line 7, in __init__ File "/home/harry/ontogpt/src/ontogpt/evaluation/enrichment/eval_enrichment.py", line 100, in __post_init__ model = modelname["names"][0] TypeError: string indices must be integers ====================================================================== ERROR: test_null_enrichment (tests.integration.test_evaluation.test_eval_enrichment.TestEvalEnrichment) Tests null enrichment terms. ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/harry/ontogpt/tests/integration/test_evaluation/test_eval_enrichment.py", line 356, in setUp self.evaluator = EvalEnrichment() File "", line 7, in __init__ File "/home/harry/ontogpt/src/ontogpt/evaluation/enrichment/eval_enrichment.py", line 100, in __post_init__ model = modelname["names"][0] TypeError: string indices must be integers ====================================================================== ERROR: test_pairwise (tests.integration.test_evaluation.test_eval_enrichment.TestEvalEnrichment) Tests template and module is loaded. ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/harry/ontogpt/tests/integration/test_evaluation/test_eval_enrichment.py", line 356, in setUp self.evaluator = EvalEnrichment() File "", line 7, in __init__ File "/home/harry/ontogpt/src/ontogpt/evaluation/enrichment/eval_enrichment.py", line 100, in __post_init__ model = modelname["names"][0] TypeError: string indices must be integers ====================================================================== ERROR: test_random_enrichment (tests.integration.test_evaluation.test_eval_enrichment.TestEvalEnrichment) Tests random terms. ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/harry/ontogpt/tests/integration/test_evaluation/test_eval_enrichment.py", line 356, in setUp self.evaluator = EvalEnrichment() File "", line 7, in __init__ File "/home/harry/ontogpt/src/ontogpt/evaluation/enrichment/eval_enrichment.py", line 100, in __post_init__ model = modelname["names"][0] TypeError: string indices must be integers ====================================================================== ERROR: test_random_gene_id (tests.integration.test_evaluation.test_eval_enrichment.TestEvalEnrichment) Tests random gene id. ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/harry/ontogpt/tests/integration/test_evaluation/test_eval_enrichment.py", line 356, in setUp self.evaluator = EvalEnrichment() File "", line 7, in __init__ File "/home/harry/ontogpt/src/ontogpt/evaluation/enrichment/eval_enrichment.py", line 100, in __post_init__ model = modelname["names"][0] TypeError: string indices must be integers ====================================================================== ERROR: test_standard_enrichment (tests.integration.test_evaluation.test_eval_enrichment.TestEvalEnrichment) Tests normal OAK enrichment. ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/harry/ontogpt/tests/integration/test_evaluation/test_eval_enrichment.py", line 356, in setUp self.evaluator = EvalEnrichment() File "", line 7, in __init__ File "/home/harry/ontogpt/src/ontogpt/evaluation/enrichment/eval_enrichment.py", line 100, in __post_init__ model = modelname["names"][0] TypeError: string indices must be integers ====================================================================== ERROR: test_standard_enrichment_no_ontology (tests.integration.test_evaluation.test_eval_enrichment.TestEvalEnrichment) Tests normal OAK enrichment. ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/harry/ontogpt/tests/integration/test_evaluation/test_eval_enrichment.py", line 356, in setUp self.evaluator = EvalEnrichment() File "", line 7, in __init__ File "/home/harry/ontogpt/src/ontogpt/evaluation/enrichment/eval_enrichment.py", line 100, in __post_init__ model = modelname["names"][0] TypeError: string indices must be integers ====================================================================== ERROR: test_write_gene_sets (tests.integration.test_evaluation.test_eval_enrichment.TestEvalEnrichment) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/harry/ontogpt/tests/integration/test_evaluation/test_eval_enrichment.py", line 356, in setUp self.evaluator = EvalEnrichment() File "", line 7, in __init__ File "/home/harry/ontogpt/src/ontogpt/evaluation/enrichment/eval_enrichment.py", line 100, in __post_init__ model = modelname["names"][0] TypeError: string indices must be integers ====================================================================== ERROR: test_create_test_and_training (tests.integration.test_evaluation.test_eval_go.TestEvalGO) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/harry/ontogpt/tests/integration/test_evaluation/test_eval_go.py", line 31, in test_create_test_and_training eos = engine.create_test_and_training() File "/home/harry/ontogpt/src/ontogpt/evaluation/go/eval_go.py", line 114, in create_test_and_training all_test_ids = set(self.valid_test_ids()) File "/home/harry/ontogpt/src/ontogpt/evaluation/go/eval_go.py", line 85, in valid_test_ids with open(TEST_CASES_DIR / "go-ids-2022.txt") as f: FileNotFoundError: [Errno 2] No such file or directory: '/home/harry/ontogpt/src/ontogpt/evaluation/go/test_cases/go-ids-2022.txt' ====================================================================== ERROR: test_eval_predictions (tests.integration.test_evaluation.test_eval_go.TestEvalGO) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/harry/ontogpt/tests/integration/test_evaluation/test_eval_go.py", line 41, in test_eval_predictions eos = engine.eval() File "/home/harry/ontogpt/src/ontogpt/evaluation/go/eval_go.py", line 144, in eval eos = self.create_test_and_training() File "/home/harry/ontogpt/src/ontogpt/evaluation/go/eval_go.py", line 114, in create_test_and_training all_test_ids = set(self.valid_test_ids()) File "/home/harry/ontogpt/src/ontogpt/evaluation/go/eval_go.py", line 85, in valid_test_ids with open(TEST_CASES_DIR / "go-ids-2022.txt") as f: FileNotFoundError: [Errno 2] No such file or directory: '/home/harry/ontogpt/src/ontogpt/evaluation/go/test_cases/go-ids-2022.txt' ====================================================================== ERROR: test_cases (tests.integration.test_knowledge_engines.test_cases.TestCases) Tests end to end knowledge extraction. ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/harry/ontogpt/tests/integration/test_knowledge_engines/test_cases.py", line 51, in test_cases ann = ke.extract_from_file(input_file) File "/home/harry/ontogpt/src/ontogpt/engines/knowledge_engine.py", line 190, in extract_from_file with file.open() as f: File "/usr/lib/python3.9/pathlib.py", line 1252, in open return io.open(self, mode, buffering, encoding, errors, newline, File "/usr/lib/python3.9/pathlib.py", line 1120, in _opener return self._accessor.open(self, flags, mode) FileNotFoundError: [Errno 2] No such file or directory: '/home/harry/ontogpt/tests/input/cases/recipe-palak-paneer.txt' ====================================================================== ERROR: test_cases (tests.integration.test_knowledge_engines.test_generalizations.TestGeneralize) Tests generalization over all cases. ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/harry/ontogpt/.venv/lib/python3.9/site-packages/sqlalchemy/engine/base.py", line 1965, in _exec_single_context self.dialect.do_execute( File "/home/harry/ontogpt/.venv/lib/python3.9/site-packages/sqlalchemy/engine/default.py", line 921, in do_execute cursor.execute(statement, parameters) sqlite3.DatabaseError: database disk image is malformed The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/home/harry/ontogpt/tests/integration/test_knowledge_engines/test_generalizations.py", line 80, in test_cases nu_obj = ke.generalize(test_obj, examples) File "/home/harry/ontogpt/src/ontogpt/engines/spires_engine.py", line 236, in generalize prompt += f"{self.serialize_object(example)}\n\n" File "/home/harry/ontogpt/src/ontogpt/engines/spires_engine.py", line 340, in serialize_object v_serialized = self._serialize_value(v, slot) File "/home/harry/ontogpt/src/ontogpt/engines/spires_engine.py", line 348, in _serialize_value return "; ".join([self._serialize_value(v, slot) for v in val if v]) File "/home/harry/ontogpt/src/ontogpt/engines/spires_engine.py", line 348, in return "; ".join([self._serialize_value(v, slot) for v in val if v]) File "/home/harry/ontogpt/src/ontogpt/engines/spires_engine.py", line 350, in _serialize_value return " - ".join([self._serialize_value(v, slot) for v in val.values() if v]) File "/home/harry/ontogpt/src/ontogpt/engines/spires_engine.py", line 350, in return " - ".join([self._serialize_value(v, slot) for v in val.values() if v]) File "/home/harry/ontogpt/src/ontogpt/engines/spires_engine.py", line 360, in _serialize_value label = labeler.label(val) File "/home/harry/ontogpt/.venv/lib/python3.9/site-packages/oaklib/implementations/sqldb/sql_implementation.py", line 473, in label for (lbl,) in q: File "/home/harry/ontogpt/.venv/lib/python3.9/site-packages/sqlalchemy/orm/query.py", line 2828, in __iter__ result = self._iter() File "/home/harry/ontogpt/.venv/lib/python3.9/site-packages/sqlalchemy/orm/query.py", line 2842, in _iter result: Union[ScalarResult[_T], Result[_T]] = self.session.execute( File "/home/harry/ontogpt/.venv/lib/python3.9/site-packages/sqlalchemy/orm/session.py", line 2262, in execute return self._execute_internal( File "/home/harry/ontogpt/.venv/lib/python3.9/site-packages/sqlalchemy/orm/session.py", line 2144, in _execute_internal result: Result[Any] = compile_state_cls.orm_execute_statement( File "/home/harry/ontogpt/.venv/lib/python3.9/site-packages/sqlalchemy/orm/context.py", line 293, in orm_execute_statement result = conn.execute( File "/home/harry/ontogpt/.venv/lib/python3.9/site-packages/sqlalchemy/engine/base.py", line 1412, in execute return meth( File "/home/harry/ontogpt/.venv/lib/python3.9/site-packages/sqlalchemy/sql/elements.py", line 515, in _execute_on_connection return connection._execute_clauseelement( File "/home/harry/ontogpt/.venv/lib/python3.9/site-packages/sqlalchemy/engine/base.py", line 1635, in _execute_clauseelement ret = self._execute_context( File "/home/harry/ontogpt/.venv/lib/python3.9/site-packages/sqlalchemy/engine/base.py", line 1844, in _execute_context return self._exec_single_context( File "/home/harry/ontogpt/.venv/lib/python3.9/site-packages/sqlalchemy/engine/base.py", line 1984, in _exec_single_context self._handle_dbapi_exception( File "/home/harry/ontogpt/.venv/lib/python3.9/site-packages/sqlalchemy/engine/base.py", line 2339, in _handle_dbapi_exception raise sqlalchemy_exception.with_traceback(exc_info[2]) from e File "/home/harry/ontogpt/.venv/lib/python3.9/site-packages/sqlalchemy/engine/base.py", line 1965, in _exec_single_context self.dialect.do_execute( File "/home/harry/ontogpt/.venv/lib/python3.9/site-packages/sqlalchemy/engine/default.py", line 921, in do_execute cursor.execute(statement, parameters) sqlalchemy.exc.DatabaseError: (sqlite3.DatabaseError) database disk image is malformed [SQL: SELECT rdfs_label_statement.value AS rdfs_label_statement_value FROM rdfs_label_statement WHERE rdfs_label_statement.subject = ?] [parameters: ('PR:P00519',)] (Background on this error at: https://sqlalche.me/e/20/4xp6) ====================================================================== ERROR: test_hallucinate (tests.integration.test_knowledge_engines.test_halo_engine.TestHALO) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/harry/ontogpt/tests/integration/test_knowledge_engines/test_halo_engine.py", line 64, in test_hallucinate elts = ke.hallucinate(["Axon", "Dendrite"], num_iterations=4) File "/home/harry/ontogpt/src/ontogpt/engines/halo_engine.py", line 118, in hallucinate if seed_elements: File "/home/harry/ontogpt/src/ontogpt/engines/halo_engine.py", line 227, in hallucinate_element prompt = self.generate_prompt(element, example_elements[0:10]) File "/home/harry/ontogpt/src/ontogpt/clients/openai_client.py", line 74, in complete raise e File "/home/harry/ontogpt/src/ontogpt/clients/openai_client.py", line 53, in complete response = openai.ChatCompletion.create( File "/home/harry/ontogpt/.venv/lib/python3.9/site-packages/openai/api_resources/chat_completion.py", line 25, in create return super().create(*args, **kwargs) File "/home/harry/ontogpt/.venv/lib/python3.9/site-packages/openai/api_resources/abstract/engine_api_resource.py", line 153, in create response, _, api_key = requestor.request( File "/home/harry/ontogpt/.venv/lib/python3.9/site-packages/openai/api_requestor.py", line 298, in request resp, got_stream = self._interpret_response(result, stream) File "/home/harry/ontogpt/.venv/lib/python3.9/site-packages/openai/api_requestor.py", line 700, in _interpret_response self._interpret_response_line( File "/home/harry/ontogpt/.venv/lib/python3.9/site-packages/openai/api_requestor.py", line 765, in _interpret_response_line raise self.handle_error_response( openai.error.InvalidRequestError: This model's maximum context length is 4097 tokens. However, you requested 4391 tokens (1391 in the messages, 3000 in the completion). Please reduce the length of the messages or completion. ====================================================================== ERROR: test_hallucinate_element (tests.integration.test_knowledge_engines.test_halo_engine.TestHALO) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/harry/ontogpt/tests/integration/test_knowledge_engines/test_halo_engine.py", line 49, in test_hallucinate_element elt = ke.hallucinate_element(name) File "/home/harry/ontogpt/src/ontogpt/engines/halo_engine.py", line 227, in hallucinate_element prompt = self.generate_prompt(element, example_elements[0:10]) File "/home/harry/ontogpt/src/ontogpt/clients/openai_client.py", line 74, in complete raise e File "/home/harry/ontogpt/src/ontogpt/clients/openai_client.py", line 53, in complete response = openai.ChatCompletion.create( File "/home/harry/ontogpt/.venv/lib/python3.9/site-packages/openai/api_resources/chat_completion.py", line 25, in create return super().create(*args, **kwargs) File "/home/harry/ontogpt/.venv/lib/python3.9/site-packages/openai/api_resources/abstract/engine_api_resource.py", line 153, in create response, _, api_key = requestor.request( File "/home/harry/ontogpt/.venv/lib/python3.9/site-packages/openai/api_requestor.py", line 298, in request resp, got_stream = self._interpret_response(result, stream) File "/home/harry/ontogpt/.venv/lib/python3.9/site-packages/openai/api_requestor.py", line 700, in _interpret_response self._interpret_response_line( File "/home/harry/ontogpt/.venv/lib/python3.9/site-packages/openai/api_requestor.py", line 765, in _interpret_response_line raise self.handle_error_response( openai.error.InvalidRequestError: This model's maximum context length is 4097 tokens. However, you requested 4391 tokens (1391 in the messages, 3000 in the completion). Please reduce the length of the messages or completion. ====================================================================== ERROR: test_hallucinate_metabolism (tests.integration.test_knowledge_engines.test_halo_engine.TestHALO) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/harry/ontogpt/tests/integration/test_knowledge_engines/test_halo_engine.py", line 80, in test_hallucinate_metabolism elts = ke.hallucinate( File "/home/harry/ontogpt/src/ontogpt/engines/halo_engine.py", line 118, in hallucinate if seed_elements: File "/home/harry/ontogpt/src/ontogpt/engines/halo_engine.py", line 227, in hallucinate_element prompt = self.generate_prompt(element, example_elements[0:10]) File "/home/harry/ontogpt/src/ontogpt/clients/openai_client.py", line 74, in complete raise e File "/home/harry/ontogpt/src/ontogpt/clients/openai_client.py", line 53, in complete response = openai.ChatCompletion.create( File "/home/harry/ontogpt/.venv/lib/python3.9/site-packages/openai/api_resources/chat_completion.py", line 25, in create return super().create(*args, **kwargs) File "/home/harry/ontogpt/.venv/lib/python3.9/site-packages/openai/api_resources/abstract/engine_api_resource.py", line 153, in create response, _, api_key = requestor.request( File "/home/harry/ontogpt/.venv/lib/python3.9/site-packages/openai/api_requestor.py", line 298, in request resp, got_stream = self._interpret_response(result, stream) File "/home/harry/ontogpt/.venv/lib/python3.9/site-packages/openai/api_requestor.py", line 700, in _interpret_response self._interpret_response_line( File "/home/harry/ontogpt/.venv/lib/python3.9/site-packages/openai/api_requestor.py", line 765, in _interpret_response_line raise self.handle_error_response( openai.error.InvalidRequestError: This model's maximum context length is 4097 tokens. However, you requested 4631 tokens (1631 in the messages, 3000 in the completion). Please reduce the length of the messages or completion. ====================================================================== ERROR: test_different_from (tests.integration.test_knowledge_engines.test_mapping.TestMapping) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/harry/ontogpt/tests/integration/test_knowledge_engines/test_mapping.py", line 108, in test_different_from meval = mapper.categorize_mapping(subject, object) File "/home/harry/ontogpt/src/ontogpt/engines/mapping_engine.py", line 123, in categorize_mapping with open(template_path) as file: FileNotFoundError: [Errno 2] No such file or directory: '' ====================================================================== ERROR: test_from_sssom (tests.integration.test_knowledge_engines.test_mapping.TestMapping) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/harry/ontogpt/tests/integration/test_knowledge_engines/test_mapping.py", line 66, in test_from_sssom tc = mapper.from_sssom( File "/home/harry/ontogpt/src/ontogpt/engines/mapping_engine.py", line 238, in from_sssom msdf = parse_sssom_table(path) File "/home/harry/ontogpt/.venv/lib/python3.9/site-packages/sssom/parsers.py", line 290, in parse_sssom_table msdf = from_sssom_dataframe(df, prefix_map=meta_all.prefix_map, meta=meta_all.metadata) File "/home/harry/ontogpt/.venv/lib/python3.9/site-packages/sssom/parsers.py", line 471, in from_sssom_dataframe prefix_map = _ensure_prefix_map(prefix_map) File "/home/harry/ontogpt/.venv/lib/python3.9/site-packages/sssom/parsers.py", line 817, in _ensure_prefix_map return add_built_in_prefixes_to_prefix_map(prefix_map) File "/home/harry/ontogpt/.venv/lib/python3.9/site-packages/sssom/context.py", line 86, in add_built_in_prefixes_to_prefix_map raise ValueError( ValueError: Built-in prefix semapv is specified (https://w3id.org/semapv/) but differs from default (https://w3id.org/semapv/vocab/) ====================================================================== ERROR: test_from_sssom2 (tests.integration.test_knowledge_engines.test_mapping.TestMapping) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/harry/ontogpt/tests/integration/test_knowledge_engines/test_mapping.py", line 80, in test_from_sssom2 msdf = parse_sssom_table(INPUT_DIR / "mondo-exact-ncit.sssom.tsv") File "/home/harry/ontogpt/.venv/lib/python3.9/site-packages/sssom/parsers.py", line 290, in parse_sssom_table msdf = from_sssom_dataframe(df, prefix_map=meta_all.prefix_map, meta=meta_all.metadata) File "/home/harry/ontogpt/.venv/lib/python3.9/site-packages/sssom/parsers.py", line 471, in from_sssom_dataframe prefix_map = _ensure_prefix_map(prefix_map) File "/home/harry/ontogpt/.venv/lib/python3.9/site-packages/sssom/parsers.py", line 817, in _ensure_prefix_map return add_built_in_prefixes_to_prefix_map(prefix_map) File "/home/harry/ontogpt/.venv/lib/python3.9/site-packages/sssom/context.py", line 86, in add_built_in_prefixes_to_prefix_map raise ValueError( ValueError: Built-in prefix semapv is specified (https://w3id.org/semapv/) but differs from default (https://w3id.org/semapv/vocab/) ====================================================================== ERROR: test_generate (tests.integration.test_knowledge_engines.test_mapping.TestMapping) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/harry/ontogpt/tests/integration/test_knowledge_engines/test_mapping.py", line 56, in test_generate results = list(mapper.run_tasks(tc)) File "/home/harry/ontogpt/src/ontogpt/engines/mapping_engine.py", line 200, in run_tasks cm = self.categorize_mapping(task.subject, task.object) File "/home/harry/ontogpt/src/ontogpt/engines/mapping_engine.py", line 123, in categorize_mapping with open(template_path) as file: FileNotFoundError: [Errno 2] No such file or directory: '' ====================================================================== ERROR: test_mapping_eval (tests.integration.test_knowledge_engines.test_mapping.TestMapping) Test evaluation of mapping on uberon. ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/harry/ontogpt/tests/integration/test_knowledge_engines/test_mapping.py", line 96, in test_mapping_eval for meval in mapper.categorize_mappings(subjects, object_sources=["ZFA"]): File "/home/harry/ontogpt/src/ontogpt/engines/mapping_engine.py", line 188, in categorize_mappings yield self.categorize_mapping(mapping.subject_id, mapping.object_id) File "/home/harry/ontogpt/src/ontogpt/engines/mapping_engine.py", line 123, in categorize_mapping with open(template_path) as file: FileNotFoundError: [Errno 2] No such file or directory: '' ====================================================================== ERROR: test_species_identical (tests.integration.test_knowledge_engines.test_mapping.TestMapping) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/harry/ontogpt/tests/integration/test_knowledge_engines/test_mapping.py", line 144, in test_species_identical meval = mapper.categorize_mapping(subject, object) File "/home/harry/ontogpt/src/ontogpt/engines/mapping_engine.py", line 123, in categorize_mapping with open(template_path) as file: FileNotFoundError: [Errno 2] No such file or directory: '' ====================================================================== ERROR: test_very_different_from (tests.integration.test_knowledge_engines.test_mapping.TestMapping) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/harry/ontogpt/tests/integration/test_knowledge_engines/test_mapping.py", line 120, in test_very_different_from meval = mapper.categorize_mapping(subject, object) File "/home/harry/ontogpt/src/ontogpt/engines/mapping_engine.py", line 123, in categorize_mapping with open(template_path) as file: FileNotFoundError: [Errno 2] No such file or directory: '' ====================================================================== ERROR: test_very_different_from2 (tests.integration.test_knowledge_engines.test_mapping.TestMapping) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/harry/ontogpt/tests/integration/test_knowledge_engines/test_mapping.py", line 132, in test_very_different_from2 meval = mapper.categorize_mapping(subject, object) File "/home/harry/ontogpt/src/ontogpt/engines/mapping_engine.py", line 123, in categorize_mapping with open(template_path) as file: FileNotFoundError: [Errno 2] No such file or directory: '' ====================================================================== ERROR: test_reason (tests.integration.test_knowledge_engines.test_reasoning.TestReasoning) Test basic reasoning, no explanations. ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/harry/ontogpt/tests/integration/test_knowledge_engines/test_reasoning.py", line 146, in test_reason for task in self.tasks(): File "/home/harry/ontogpt/tests/integration/test_knowledge_engines/test_reasoning.py", line 133, in tasks yield extractor.extract_incoherent_ontology_task( File "/home/harry/ontogpt/src/ontogpt/ontex/extractor.py", line 1538, in extract_incoherent_ontology_task raise ValueError("Must specify incoherents, siblings, and disjoints") ValueError: Must specify incoherents, siblings, and disjoints ====================================================================== ERROR: test_reason_with_chain_of_thought (tests.integration.test_knowledge_engines.test_reasoning.TestReasoning) Test reasoning with explicit chain-of-thought trigger. ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/harry/ontogpt/tests/integration/test_knowledge_engines/test_reasoning.py", line 178, in test_reason_with_chain_of_thought for task in self.tasks(): File "/home/harry/ontogpt/tests/integration/test_knowledge_engines/test_reasoning.py", line 133, in tasks yield extractor.extract_incoherent_ontology_task( File "/home/harry/ontogpt/src/ontogpt/ontex/extractor.py", line 1538, in extract_incoherent_ontology_task raise ValueError("Must specify incoherents, siblings, and disjoints") ValueError: Must specify incoherents, siblings, and disjoints ====================================================================== ERROR: test_reason_with_explanations (tests.integration.test_knowledge_engines.test_reasoning.TestReasoning) Test reasoning with explanations included. ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/harry/ontogpt/tests/integration/test_knowledge_engines/test_reasoning.py", line 162, in test_reason_with_explanations for task in self.tasks(): File "/home/harry/ontogpt/tests/integration/test_knowledge_engines/test_reasoning.py", line 133, in tasks yield extractor.extract_incoherent_ontology_task( File "/home/harry/ontogpt/src/ontogpt/ontex/extractor.py", line 1538, in extract_incoherent_ontology_task raise ValueError("Must specify incoherents, siblings, and disjoints") ValueError: Must specify incoherents, siblings, and disjoints ====================================================================== ERROR: tests.integration.test_knowledge_engines.test_spires_engine (unittest.loader._FailedTest) ---------------------------------------------------------------------- ImportError: Failed to import test module: tests.integration.test_knowledge_engines.test_spires_engine Traceback (most recent call last): File "/usr/lib/python3.9/unittest/loader.py", line 436, in _find_test_path module = self._get_module_from_name(name) File "/usr/lib/python3.9/unittest/loader.py", line 377, in _get_module_from_name __import__(name) File "/home/harry/ontogpt/tests/integration/test_knowledge_engines/test_spires_engine.py", line 93, in TEST_PROCESS = BiologicalProcess( File "/home/harry/ontogpt/.venv/lib/python3.9/site-packages/pydantic/main.py", line 165, in __init__ __pydantic_self__.__pydantic_validator__.validate_python(data, self_instance=__pydantic_self__) pydantic_core._pydantic_core.ValidationError: 1 validation error for BiologicalProcess id Field required [type=missing, input_value={'label': 'autophagosome ...utputs': ['GO:0005776']}, input_type=dict] For further information visit https://errors.pydantic.dev/2.3/v/missing