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: Raises error when exceeding block max on metagraph #1722

Merged
merged 4 commits into from
Feb 28, 2024

Conversation

gus-opentensor
Copy link
Collaborator

  • Raises error now for this Note
  • Sets block max at 300.

@gus-opentensor gus-opentensor changed the base branch from master to staging February 26, 2024 17:42
Copy link
Contributor

@ifrit98 ifrit98 left a 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(
Copy link
Contributor

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

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yep!

Copy link
Contributor

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)
Copy link
Contributor

Choose a reason for hiding this comment

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

:)

@ifrit98 ifrit98 merged commit c632442 into staging Feb 28, 2024
12 checks passed
@ifrit98 ifrit98 mentioned this pull request Mar 7, 2024
@gus-opentensor gus-opentensor deleted the fix/gus/raise-error-when-exceeding-block-max branch March 7, 2024 16:34
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