ontogpt icon indicating copy to clipboard operation
ontogpt copied to clipboard

Add caching for mapper

Open caufieldjh opened this issue 2 months ago • 0 comments

The knowledge engine class includes a map_identifier function: https://github.com/monarch-initiative/ontogpt/blob/e3a68ae8391b12559842089657799156c06fd2f0/src/ontogpt/engines/knowledge_engine.py#L418

This calls the NodeNormalizer API through OAK: https://github.com/INCATools/ontology-access-kit/blob/0a734a8383943891173eaf8b1fd95cf4fde1f65e/src/oaklib/implementations/translator/translator_implementation.py

This process can take some time, especially when grounding many entities.

In some cases, we may not need to use the service at all: we may expect mappings to be uninformative. In other cases, we may be grounding redundantly, and can cache our results.

requests-cache may help here.

caufieldjh avatar Apr 12 '24 22:04 caufieldjh