Skip to content

dont sync metagraph on neuron init#1423

Merged
ifrit98 merged 1 commit intorelease/5.2.1from
dont-sync-meta-on-init
Jun 29, 2023
Merged

dont sync metagraph on neuron init#1423
ifrit98 merged 1 commit intorelease/5.2.1from
dont-sync-meta-on-init

Conversation

@camfairchild
Copy link
Contributor

This fixes errors that require the subtensor config to be passed on the CLI.

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.

Great catch!

Will port this over to openminers also.

Copy link
Contributor

@p-ferreira p-ferreira left a comment

Choose a reason for hiding this comment

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

LGTM although I'm not sure if I understood the implication on the validator.
So we want to sync the metagraph with self.subtensor?

The current implementation on openvalidators syncs like
self.metagraph.sync(). I see in the metagraph code that lite is set to true by default, but the subtensor is initially empty and later filled with bt.subtensor.

Should we replicate this approach to the openvalidators as well?

@ifrit98
Copy link
Contributor

ifrit98 commented Jun 29, 2023

Should we replicate this approach to the openvalidators as well?

I believe we should, as (soon-ish) _neuron will be removed from bittensor proper with the next release following 5.2.1.

@ifrit98
Copy link
Contributor

ifrit98 commented Jun 29, 2023

See #1426

@camfairchild
Copy link
Contributor Author

LGTM although I'm not sure if I understood the implication on the validator.
So we want to sync the metagraph with self.subtensor?

The current implementation on openvalidators syncs like
self.metagraph.sync(). I see in the metagraph code that lite is set to true by default, but the subtensor is initially empty and later filled with bt.subtensor.

The config for the subtensor, including any chain endpoint, only gets passed to self.subtensor

We also need that when syncing the metagraph, so we have to pass that in somehow, meaning we should sync using it and disable the auto-sync when it initializes the object (because it has no config param)

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.

3 participants