-
Notifications
You must be signed in to change notification settings - Fork 632
BugFix: Resolve PolicyFlashlb warm up function attribute error #4741
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?
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -3,7 +3,7 @@ | |||||||||
| from .policy_abstract import DynamicConfig, EplbPolicy | ||||||||||
| from .policy_dynamic_ep import DynamicEplb | ||||||||||
| from .policy_dynamic_ep_v2 import DynamicEplbV2 | ||||||||||
| from .policy_flashlb import FlashLB | ||||||||||
| from .policy_flashlb import FlashLB, warm_up | ||||||||||
| from .policy_random import RandomLoadBalance | ||||||||||
|
|
||||||||||
|
|
||||||||||
|
|
@@ -29,5 +29,5 @@ def generate_policy(policy_type: int, config: DynamicConfig) -> EplbPolicy: | |||||||||
| policy_class = policy.get(policy_type, RandomLoadBalance) | ||||||||||
| policy_instance = policy_class(config) | ||||||||||
| if policy_type == 3: | ||||||||||
| policy_instance.warm_up() | ||||||||||
| return policy_instance | ||||||||||
| warm_up() | ||||||||||
| return policy_instance | ||||||||||
|
Comment on lines
+32
to
+33
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. While this change fixes the This approach is misleading and potentially incorrect. The warm-up uses a hardcoded configuration that might differ from the runtime configuration of The original code (
Suggested change
|
||||||||||
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.
This import of
warm_upsupports a fix that is logically flawed. The recommended approach is to makewarm_upa method of theFlashLBclass, which would make this import unnecessary and lead to a more correct and maintainable solution. This would involve reverting this change and modifyingpolicy_flashlb.py.