Skip to content
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

fix: improve weight setting reliability and synchronization #342

Draft
wants to merge 21 commits into
base: main
Choose a base branch
from

Conversation

5u6r054
Copy link
Contributor

@5u6r054 5u6r054 commented Jan 17, 2025

🧪 Testing

The changes have been tested in both development and production environments, with particular attention to:

  • Weight setting reliability and timing
  • Error handling and recovery
  • Logging clarity and usefulness
  • Performance under various conditions
  • Proper state management

💥 Impact

These changes significantly improve the validator's reliability and maintainability by:

  • Ensuring more reliable weight setting
  • Providing clearer feedback through logs
  • Reducing noise in error reporting
  • Maintaining better state management
  • Improving error recovery

⚠️ Breaking Changes

None. All changes maintain backward compatibility while improving existing functionality.

🔜 Next Steps

  • Monitor the improved logging in production
  • Gather feedback on the new error handling approach
  • Consider additional performance optimizations

JD added 3 commits January 17, 2025 10:29
- Prevent concurrent weight setting attempts between base neuron and validator\n- Use consistent timing reference for weight updates\n- Fix unnecessary f-string in logging\n- Add proper locking in validator scoring loop\n- Wait for transaction finalization to prevent ancient block errors
Copy link

PR description is too short and seems to not fulfill PR template, please fill in

Copy link

PR description is too short and seems to not fulfill PR template, please fill in

Copy link

PR description is too short and seems to not fulfill PR template, please fill in

Copy link

codecov bot commented Jan 17, 2025

Codecov Report

Attention: Patch coverage is 28.94737% with 27 lines in your changes missing coverage. Please review.

Project coverage is 61.83%. Comparing base (21673e7) to head (095b899).

Files with missing lines Patch % Lines
masa/base/validator.py 33.33% 16 Missing ⚠️
masa/base/neuron.py 21.42% 11 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #342      +/-   ##
==========================================
- Coverage   62.67%   61.83%   -0.85%     
==========================================
  Files          23       23              
  Lines        1321     1344      +23     
==========================================
+ Hits          828      831       +3     
- Misses        493      513      +20     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

- Change non-critical errors to warnings (trending queries, subnet config, protocol API, tweet requests) - Keep appropriate warning levels for validation failures - Files modified: masa/validator/forwarder.py, masa/base/validator.py, masa/miner/twitter/tweets.py
Copy link

PR description is too short and seems to not fulfill PR template, please fill in

- Change non-critical connection errors from ERROR to WARNING/DEBUG level

- Add summary counts instead of individual errors for miner responses

- Show unique miner versions instead of full list

- Improve error handling and response validation

- Add concise status summaries for ping and volume operations
Copy link

PR description is too short and seems to not fulfill PR template, please fill in

- Replace full UID lists with summary counts in logging

- Update get_random_miner_uids and get_uncalled_miner_uids to show concise stats

- Remove redundant logging of individual UIDs

- Clean up imports and fix linter errors
Copy link

PR description is too short and seems to not fulfill PR template, please fill in

JD added 2 commits January 17, 2025 11:54
- Add missing score_miners method to fix UnboundLocalError\n- Initialize weights_rate_limit at startup\n- Add proper locking to prevent concurrent scoring\n- Improve error handling and logging in scoring methods\n- Maintain consistent scoring intervals based on weights_rate_limit
- Change non-critical connection errors to warnings\n- Add summary counts for successful responses\n- Improve error handling for connection failures\n- Clean up logging messages for better clarity
Copy link

PR description is too short and seems to not fulfill PR template, please fill in

…r handling

- Restored tweet validation, score tracking, and tweet export logic

- Maintained improved error handling and logging

- Added success/failure counts for better monitoring

- Improved clarity of log messages
Copy link

PR description is too short and seems to not fulfill PR template, please fill in

…le preserving scoring logic - Split large methods into focused units, change non-critical errors to WARNING level, add error statistics and summary counts, improve error recovery while preserving all scoring logic
Copy link

PR description is too short and seems to not fulfill PR template, please fill in

Copy link

PR description is too short and seems to not fulfill PR template, please fill in

@5u6r054 5u6r054 marked this pull request as draft January 17, 2025 22:43
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.

1 participant