-
Notifications
You must be signed in to change notification settings - Fork 165
feat(BA-3399): Implement AutoScalingRule strawberry GraphQL DataLoaders
#7428
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?
Conversation
AutoScalingRule strawberry GraphQL DataLoadersAutoScalingRule strawberry GraphQL DataLoaders
| async def load_auto_scaling_rules_by_ids( | ||
| processor: Optional[DeploymentProcessors], |
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.
There seems to be no reason to make the processor optional.
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.
deployment: Optional[DeploymentProcessors]
deployment under Processors is Optional.
I don't know why..
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.
| deployment: Optional[DeploymentProcessors] |
| @cached_property | ||
| def auto_scaling_rule_loader( | ||
| self, | ||
| ) -> DataLoader[uuid.UUID, Optional[ModelDeploymentAutoScalingRuleData]]: | ||
| return DataLoader( | ||
| load_fn=partial(load_auto_scaling_rules_by_ids, self._processors.deployment) | ||
| ) |
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.
The original intention was to place the closure in the same place, but this is not bad either.
src/ai/backend/manager/api/gql/data_loader/auto_scaling_rule/loader.py
Outdated
Show resolved
Hide resolved
9552aac to
4af738e
Compare
resolves #7340 (BA-3399)
Checklist: (if applicable)
ai.backend.testdocsdirectory