[Logging I/O] Post inference hooks as background tasks#422
Merged
Conversation
saiatmakuri
reviewed
Jan 20, 2024
model-engine/model_engine_server/inference/forwarding/http_forwarder.py
Outdated
Show resolved
Hide resolved
model-engine/model_engine_server/inference/forwarding/celery_forwarder.py
Show resolved
Hide resolved
|
This pull request has been linked to Shortcut Story #832920: Post inference hooks as background tasks. |
saiatmakuri
reviewed
Jan 23, 2024
Contributor
There was a problem hiding this comment.
any way to pass in forwarder to the class rather than using encapsulation? maybe the @app.task decorator allows custom args to be passed into the base class?
Contributor
Author
There was a problem hiding this comment.
yeah I originally tried that approach but sadly you can't pass in custom args into the @app.task decorator: https://docs.celeryq.dev/en/stable/userguide/tasks.html#list-of-options
model-engine/model_engine_server/inference/forwarding/http_forwarder.py
Outdated
Show resolved
Hide resolved
model-engine/model_engine_server/inference/forwarding/http_forwarder.py
Outdated
Show resolved
Hide resolved
c477762 to
932bcc9
Compare
saiatmakuri
approved these changes
Jan 23, 2024
Merged
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.
Pull Request Summary
Making post inference hooks execute as background tasks in the forwarder (
http_forwarderfor sync,celery_forwarderfor async).Test Plan and Usage Guide
Local testing (unit tests are follow ups):
Sync:

Async:

sc-832920