Lightning-AI / LitServe

Lightning-fast serving engine for any AI model of any size. Flexible. Easy. Enterprise-scale.
https://lightning.ai/docs/litserve
Apache License 2.0
2.51k stars 160 forks source link

Add custom healthcheck path #342

Closed akuma12 closed 1 week ago

akuma12 commented 1 month ago
Before submitting - [ ] Was this discussed/agreed via a Github issue? (no need for typos and docs improvements) - [x] Did you read the [contributor guideline](https://github.com/Lightning-AI/pytorch-lightning/blob/main/.github/CONTRIBUTING.md), Pull Request section? - [ ] Did you make sure to update the docs? - I would if I knew where to do that. - [x] Did you write any new necessary tests?

What does this PR do?

Fixes #341 by adding a healthcheck_path property to the LitServer class, defaulting to the current path of /health.

PR review

Anyone in the community is free to review the PR once the tests have passed. If we didn't discuss your PR in GitHub issues there's a high chance it will not be merged.

Did you have fun?

I did!

codecov[bot] commented 1 month ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 96%. Comparing base (e23469c) to head (14077f2). Report is 1 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #342 +/- ## =================================== Coverage 96% 96% =================================== Files 22 22 Lines 1408 1411 +3 =================================== + Hits 1345 1348 +3 Misses 63 63 ```