-
Notifications
You must be signed in to change notification settings - Fork 334
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
[BIT-540] Choose responsive UIDs for setting weights in validator + validator save/load #872
[BIT-540] Choose responsive UIDs for setting weights in validator + validator save/load #872
Conversation
Prefer current epoch's responsive UIDs, randomly sample min_allowed_weights number of UIDs to set weights to. Discard max_allowed_ratio in favor of filtering non-zero weights, expecting consensus-levels (number of validators setting weights for UID) to be equal on average for responsive nodes. This means max_allowed_ratio is no longer strictly required for boosting consensus. If there are less than min_allowed_weights non-zero weights, then set_weights should fail.
Return a k length list of unique elements chosen from the population sequence or set. Used for random sampling without replacement (so no uid duplicates expected).
Uses save and load format of core_server.
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
neuron_weights = neuron_weights[neuron_weights > 0] # filter to non-zero weights | ||
|
||
# === Slice min_allowed_weights UIDs === | ||
sample_uids = preferred_uids[:min_allowed_weights] # slice to min_allowed_weights |
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.
actually i have always been confused, cause min_allowed_weight
is just the minimum network requirement,
so shouldnt we set it to max(min_allowed_weight, len(responsive_uids))
?
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.
Previously and currently validators always fixed the number of weights set to min_allowed_weight, likely because the demands on subtensor are more predictable then and because validators operate more similarly the consensus is improved.
BIT-540 Choose responsive UIDs for setting weights in validator
Prefer current epoch's responsive UIDs, randomly sample min_allowed_weights number of UIDs to set weights to.
Discard max_allowed_ratio in favor of filtering non-zero weights, expecting consensus-levels (number of validators setting weights for UID) to be equal on average for responsive nodes. This means max_allowed_ratio is no longer strictly required for boosting consensus.
If there are less than min_allowed_weights non-zero weights, then set_weights should fail.
BIT-536 Validator save and load from filesystem