Skip to content

fix: weight setting#269

Merged
grantdfoster merged 1 commit intomainfrom
fix--weight-setting
Mar 3, 2026
Merged

fix: weight setting#269
grantdfoster merged 1 commit intomainfrom
fix--weight-setting

Conversation

@grantdfoster
Copy link
Contributor

@grantdfoster grantdfoster commented Mar 3, 2026

Summary

Fixes a critical bug in weight setting where platform_manager was referenced without self., causing a NameError and preventing weights from being set.

Error seen in production:

ERROR | background_tasks:set_weights_loop:303 - Error in setting weights: name 'platform_manager' is not defined

Changes

  • Fixed platform_manager.extract_platform_metrics_from_stats()self.platform_manager.extract_platform_metrics_from_stats() (line 355)
  • Fixed platform_manager.get_all_platforms()self.platform_manager.get_all_platforms() (line 384)

Test plan

  • All 29 unit tests pass locally
  • Verified no other instances of this bug exist in the codebase

Copilot AI review requested due to automatic review settings March 3, 2026 21:49
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Fixes a runtime error in the validator’s weight/telemetry delta processing by consistently using the WeightsManager’s PlatformManager instance when extracting per-platform metrics and iterating platform configs.

Changes:

  • Use self.platform_manager (instance member) instead of an undefined platform_manager reference when extracting platform metrics.
  • Use self.platform_manager when iterating all platform configs to compute dynamic error totals.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@grantdfoster grantdfoster merged commit 10f5132 into main Mar 3, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants