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

Optimise API model discovery speed #1690

Merged
merged 16 commits into from Dec 16, 2020
Merged

Conversation

RobertLucian
Copy link
Member

@RobertLucian RobertLucian commented Dec 12, 2020

Closes #1663.

As an example, for #1592, it reduces the discovery time of models from ~300 seconds down to about 16 seconds (s3.search + model dir validation). 9 seconds are for s3.search and about 7 seconds are for validating the models. This is while factoring in the fact that there are ~10k paths with the specified prefix in cortex.yaml#predictor.models.dir.

  • The validating functions can be further optimized.
  • A profiling tool has been used for this.

checklist:

  • run make test and make lint
  • test manually (i.e. build/push all images, restart operator, and re-deploy APIs)

Copy link
Member Author

@RobertLucian RobertLucian left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A mod requested.

pkg/workloads/cortex/lib/util.py Show resolved Hide resolved
@RobertLucian RobertLucian merged commit 62439ad into master Dec 16, 2020
@RobertLucian RobertLucian deleted the fix/paths-optimization branch December 16, 2020 22:16
@RobertLucian RobertLucian self-assigned this Dec 18, 2020
@RobertLucian RobertLucian added this to the v0.25 milestone Dec 18, 2020
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

Successfully merging this pull request may close these issues.

Speed up the searching/validating processes of models on the serving container
2 participants