-
Notifications
You must be signed in to change notification settings - Fork 272
Automatically set 0 to deregistered subnets #240
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
Conversation
dd5e2e8 to
441eeb9
Compare
sam0x17
left a comment
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 good in general, one loop I think could be improved significantly
Updated weight setting to directly use .clone() for much faster copying than the old loop style. Co-authored-by: Sam Johnson <sam@durosoft.com>
|
Thanks @sam0x17 this was super helpful, updated the loop after testing. |
|
@shibshib did you have any thoughts regarding what I was saying about "is there anything we can do to avoid looping over the whole vec" -- I don't have enough context to know the topology of the |
…ereg_automatic_weighing
We unfortunately have to loop through the whole vec. The vector itself contains the weights set by validators for all subnets. If a subnet's weight must be reset to 0, it has to be reset by every validator as well. Hence, it's hard to optimize that further, I don't think. Open to suggestions though! |
|
should be good as-is then 👍🏻 |
unconst
left a comment
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
…opentensor/subtensor into subnet_dereg_automatic_weighing
…opentensor/subtensor into subnet_dereg_automatic_weighing
…ubnet_dereg_automatic_weighing
This will ensure that when subnets are deregistered, its weights are automagically set to 0.