-
Notifications
You must be signed in to change notification settings - Fork 351
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: Raises error when exceeding block max on metagraph #1722
Fix: Raises error when exceeding block max on metagraph #1722
Conversation
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.
LGTM!
@@ -499,6 +499,12 @@ def sync( | |||
|
|||
subtensor = bittensor.subtensor(network='archive') | |||
""" | |||
|
|||
if block > 300: | |||
raise ValueError( |
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.
Can we use bittensor.logging.error
here? Can still raise a value error, but should be logged this way as well
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.
Yep!
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.
Looks like we're getting test errors now
@@ -133,7 +133,7 @@ def mock_subtensor(): | |||
# Mocking the metagraph instance for testing purposes | |||
@pytest.fixture | |||
def metagraph_instance(): | |||
metagraph = Metagraph(netuid=1, sync=False) | |||
metagraph = Metagraph(netuid=1337, sync=False) |
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.
:)
300
.