-
Notifications
You must be signed in to change notification settings - Fork 17
Celery usage metrics #480
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
base: main
Are you sure you want to change the base?
Celery usage metrics #480
Conversation
| return { | ||
| "status_code": 200, | ||
| "client": client.as_schema(censored=False).model_dump(), | ||
| "cycle_offset": router._cycle.offset, | ||
| "requeue_count": self.request.retries, | ||
| "performance_indicator": performance_indicator, | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pas en lien direct avec cette PR, mais je trouve que ça pourrait être mieux typé ici.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tu veux dire au niveau du type de retour ? Faire un schéma dédié ?
…ution - Introduced a new `priority` field in the User model to manage user priorities for scheduling and rate limiting. - Updated the IdentityAccessManager to handle user priority during user creation and updates. - Enhanced the BaseModelRouter to implement a least-loaded routing strategy for model invocation, selecting the provider with the fewest inflight requests. - Added Celery configuration for asynchronous task execution, allowing model invocations to be processed in the background. - Implemented a new `invoke_model_request` function to handle both eager and Celery-based invocations based on configuration. - Updated API schemas to include priority in user-related requests and responses. - Added necessary database migrations to support the new priority field in the User table. - Enhanced unit tests to cover new functionality and ensure proper integration with Celery. fix iam tests update config to run test without workers Update coverage badge Update configuration documentation update alembic add least loaded router Add documentation Update diagram Refactor Redis connection handling for thread safety and performance Refactor chat completions to use invoke_model_request for non-streaming responses fix : base model router lock fix: lock release feat: add additional_data parameter to invoke_model_request and invoke_model_task fix: handle SoftTimeLimitExceeded in invoke_model_task for structured response refactor: enhance streaming response handling with safe client access routing fix: ensure client lock is released properly in delete_client method aristote dispatcher philosophy (untested fix celery task fix round robin fix receive task result task failure handling fix requeuing remarques pr tests simplify celery task by removing async
a4bb0c2 to
3026bcb
Compare
|
|
||
|
|
||
| # revision identifiers, used by Alembic. | ||
| revision: str = "4d42cbcaecff" |
Check notice
Code scanning / CodeQL
Unused global variable Note
Copilot Autofix
AI about 2 months ago
Copilot could not generate an autofix suggestion
Copilot could not generate an autofix suggestion for this alert. Try pushing a new commit or if the problem persists contact support.
|
|
||
| # revision identifiers, used by Alembic. | ||
| revision: str = "4d42cbcaecff" | ||
| down_revision: Union[str, None] = "a1b2c3d4e5f6" |
Check notice
Code scanning / CodeQL
Unused global variable Note
Copilot Autofix
AI about 2 months ago
Copilot could not generate an autofix suggestion
Copilot could not generate an autofix suggestion for this alert. Try pushing a new commit or if the problem persists contact support.
| # revision identifiers, used by Alembic. | ||
| revision: str = "4d42cbcaecff" | ||
| down_revision: Union[str, None] = "a1b2c3d4e5f6" | ||
| branch_labels: Union[str, Sequence[str], None] = None |
Check notice
Code scanning / CodeQL
Unused global variable Note
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI about 2 months ago
To resolve the issue, the global variable branch_labels should be removed from the file since it is not used anywhere in the module and does not serve any documented purpose. Delete line 18 assigning branch_labels—while ensuring that nothing else in the file references it. No additional imports or definitions are required for this fix, and nothing else needs to change.
| @@ -15,7 +15,6 @@ | ||
| # revision identifiers, used by Alembic. | ||
| revision: str = "4d42cbcaecff" | ||
| down_revision: Union[str, None] = "a1b2c3d4e5f6" | ||
| branch_labels: Union[str, Sequence[str], None] = None | ||
| depends_on: Union[str, Sequence[str], None] = None | ||
|
|
||
|
|
| revision: str = "4d42cbcaecff" | ||
| down_revision: Union[str, None] = "a1b2c3d4e5f6" | ||
| branch_labels: Union[str, Sequence[str], None] = None | ||
| depends_on: Union[str, Sequence[str], None] = None |
Check notice
Code scanning / CodeQL
Unused global variable Note
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI about 2 months ago
The best way to fix the problem is simply to remove the depends_on variable assignment on line 19 in api/alembic/versions/2025_10_10_1807-4d42cbcaecff_add_observability_usage_metrics.py. Doing so will not alter the migration's functionality, especially as there is no explicit dependency declared. No other changes (imports, structural changes, etc.) are required.
| @@ -16,7 +16,6 @@ | ||
| revision: str = "4d42cbcaecff" | ||
| down_revision: Union[str, None] = "a1b2c3d4e5f6" | ||
| branch_labels: Union[str, Sequence[str], None] = None | ||
| depends_on: Union[str, Sequence[str], None] = None | ||
|
|
||
|
|
||
| def upgrade() -> None: |
No description provided.