Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add caching for mapper #363

Open
caufieldjh opened this issue Apr 12, 2024 · 0 comments
Open

Add caching for mapper #363

caufieldjh opened this issue Apr 12, 2024 · 0 comments

Comments

@caufieldjh
Copy link
Member

The knowledge engine class includes a map_identifier function:

def map_identifier(self, input_id: str, cls: ClassDefinition) -> Iterator[str]:

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant