Add Allegro API server implementation with Prometheus metrics support #10
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 Template for MinMochi
Description
What does this PR do?
This PR introduces the
allegro_serve.py
script to implement the Allegro API using LitServe. It also adds Prometheus metrics for tracking request processing times, integrates error handling and logging for better traceability, and implements S3 upload functionality for video outputs. Furthermore, it includes the creation of theAllegroRequest
model for input validation and theAllegroAPI
class for handling inference requests.Related Issue
Fixes #
Changes Summary
Key Changes:
allegro_serve.py
:AllegroRequest
Model:Added Dependencies:
Testing
Unit Tests:
Steps to Test:
allegro_serve.py
script locally using test payloads.Expected Behavior:
Checklist
pylint
,black
, or equivalent formatting tools.Metrics and Monitoring
Prometheus:
request_processing_time
Logging:
loguru
.Additional Information
allegro_serve.py
script is recommended.