replaces on_event with lifespan event handlers#87
Open
anthonyduong9 wants to merge 4 commits intomainfrom
Open
replaces on_event with lifespan event handlers#87anthonyduong9 wants to merge 4 commits intomainfrom
anthonyduong9 wants to merge 4 commits intomainfrom
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #87 +/- ##
========================================
+ Coverage 7.86% 7.92% +0.06%
========================================
Files 124 125 +1
Lines 17470 17505 +35
Branches 381 381
========================================
+ Hits 1374 1388 +14
- Misses 16085 16106 +21
Partials 11 11
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
c7a29ea to
688e29b
Compare
688e29b to
127cc59
Compare
Owner
|
Sorry for the delay in getting around to this. The cost-benefit doesn't work out currnetly for this change: it eliminates a deprecation warning in the code, but it will be a heavy lift to test this in production (Kubernetes/GoogleCloud is slow, plus resolving issues could take a significant amount of time debugging). |
127cc59 to
cccbc17
Compare
replaces print() with logging
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
inferencetests are run, theDeprecationWarningon_event is deprecated, use lifespan event handlers instead.shows up in the logs.autointerp, we suppress the error with# type: ignore[deprecated].Fix
on_eventfunctions.lifespan()functions and passing them toFastAPI.lifespan.Testing
apps/inference, I ranpoetry run python start.py, and made several requests to POST/tokenize.apps/autointerp, I ranpoetry run uvicorn server:app --host 0.0.0.0 --port 5003 --workers 1and made requests to each endpoint besides for POST/score/embedding.Fixes #70