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

Validator hotfix min allowed weights #885

Merged
merged 22 commits into from
Aug 23, 2022
Merged
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
b61e850
fixed mp speed up
isabella618033 Mar 24, 2022
598cb21
Merge branch 'BIT-383-mp_pow_fix' of https://github.com/opentensor/bi…
isabella618033 Mar 24, 2022
a5fd3e1
Merge branch 'master' into BIT-383-mp_pow_fix
isabella618033 Mar 24, 2022
c3774ab
Merge branch 'master' into BIT-383-mp_pow_fix
unconst Mar 24, 2022
c0a9b1f
fix test
isabella618033 Mar 24, 2022
74d8b2c
Merge branch 'BIT-383-mp_pow_fix' of https://github.com/opentensor/bi…
isabella618033 Mar 24, 2022
39a91fb
test fix
isabella618033 Mar 24, 2022
1fdee59
test fix
isabella618033 Mar 25, 2022
2b37f40
num_processes fix
isabella618033 Mar 25, 2022
c9ceb94
undo use only half of the processes
isabella618033 Mar 25, 2022
1483d1c
print time
isabella618033 Mar 25, 2022
3b55a88
Merge branch 'master' of https://github.com/opentensor/bittensor
Eugene-hu Apr 7, 2022
9b7fd49
Merge branch 'master' of https://github.com/opentensor/bittensor
Eugene-hu Apr 25, 2022
c05d347
Merge branch 'master' of https://github.com/opentensor/bittensor
Eugene-hu May 10, 2022
316b7b9
Merge branch 'master' of https://github.com/opentensor/bittensor
Eugene-hu May 17, 2022
6a1be9e
Merge branch 'master' of https://github.com/opentensor/bittensor
Eugene-hu Jun 28, 2022
be7e165
Merge branch 'master' of https://github.com/opentensor/bittensor
Eugene-hu Jun 28, 2022
7ec1acf
Merge branch 'master' of https://github.com/opentensor/bittensor
Eugene-hu Jun 29, 2022
de099f1
Merge branch 'master' of https://github.com/opentensor/bittensor
Eugene-hu Aug 9, 2022
5aa0ec4
Merge branch 'master' of https://github.com/opentensor/bittensor
Eugene-hu Aug 12, 2022
1222cc8
Merge branch 'master' of https://github.com/opentensor/bittensor
Eugene-hu Aug 22, 2022
b766951
Validator hotfix
Eugene-hu Aug 22, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions bittensor/_neuron/text/core_validator/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -603,9 +603,10 @@ def calculate_weights(self, responsive_uids: Set, queried_uids: Set):
preferred_uids = preferred_uids[neuron_weights > 0] # filter to non-zero weights
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
sample_weights = neuron_weights[:min_allowed_weights] # slice to min_allowed_weights
# === Slice weights_to_set UIDs ===
weights_to_set = max([min_allowed_weights, len(responsive_uids)])
sample_uids = preferred_uids[:weights_to_set] # slice to weights_to_set
sample_weights = neuron_weights[:weights_to_set] # slice to weights_to_set

# === Normalize and apply max_allowed_ratio ===
sample_weights = bittensor.utils.weight_utils.normalize_max_multiple(x=sample_weights,
Expand Down