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

Use pydantic models natively in score #62

Open
cbizon opened this issue Feb 2, 2022 · 0 comments
Open

Use pydantic models natively in score #62

cbizon opened this issue Feb 2, 2022 · 0 comments

Comments

@cbizon
Copy link
Contributor

cbizon commented Feb 2, 2022

Our score method takes in pydantic models, then converts them to dicts, operates on them, and then turns them back into models to return them.

These operations are very expensive for large messages. For a one hop coalesced answer to (small molecules)-[treat]-(hyperlipidemia) the decoding process calls instancecheck a zillion times, accounting for about 40% of the time.

Presumably there's no reason to spend 40% of our time decoding things.

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

No branches or pull requests

1 participant