refactor: remove dead setup_events_logger helper and unused events.log handler#709
Merged
anderdc merged 7 commits intoentrius:testfrom Apr 23, 2026
Merged
Conversation
Contributor
Author
|
@anderdc would you please review this PR? |
anderdc
requested changes
Apr 23, 2026
Collaborator
anderdc
left a comment
There was a problem hiding this comment.
Cleanup is incomplete — the CLI surface for the removed feature is still registered. Please also drop the two orphan add_argument blocks in gittensor/utils/config.py:
--neuron.events_retention_size(lines 80-85)--neuron.dont_save_events(lines 87-92)
Nothing consumes them after this PR, so they'd just show up in --help and silently accept values that do nothing.
…ctor/remove-dead-events-logger
…om/bittoby/gittensor into refactor/remove-dead-events-logger
Contributor
Author
|
@anderdc Updated! |
anderdc
approved these changes
Apr 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Removes
setup_events_logger()fromgittensor/utils/logging.pyand its single call site incheck_config(). The helper ran on every validator startup, monkey-patchinglogging.Logger.eventonto the stdlibLoggerclass and opening aRotatingFileHandleronevents.log, but nothing in the repository ever calls.event().Normal
bt.logging.*calls and thebittensor.logrotating file are unaffected - those flow through bittensor'sLoggingMachine, not through the removed helper.Related Issues
Closes #708
Type of Change
Testing
Full test suite passes (410 tests).
ruff check,ruff format, andpyrightall clean.Checklist