Skip to content

Commit

Permalink
Merge pull request #151 from macrocosm-os/dev
Browse files Browse the repository at this point in the history
Release 4.1.1
  • Loading branch information
Sid-Data-Universe committed Aug 15, 2024
2 parents d017f7b + ce48b8c commit cb888b4
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
12 changes: 5 additions & 7 deletions constants/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@

# Minimum percent of weight on a vali for a miner to be considered a top miner.
# Since there can be multiple competitions at different reward percentages we can't just check biggest.
WEIGHT_SYNC_MINER_MIN_PERCENT = 0.10
WEIGHT_SYNC_MINER_MIN_PERCENT = 0.05

# A mapping of block numbers to the supported model types as of that block.
ALLOWED_MODEL_TYPES_1 = {
Expand Down Expand Up @@ -181,8 +181,7 @@
CompetitionId.B7_MODEL,
MODEL_CONSTRAINTS_BY_COMPETITION_ID[CompetitionId.B7_MODEL],
0.57,
)

),
],
),
]
Expand Down Expand Up @@ -215,7 +214,7 @@
sample_unpack_block = BLOCK_3B_7BSTAR_UNPACK

# validators number of pages to eval over miners on each step.
pages_per_eval_unpack = 5 # With sample unpacking
pages_per_eval_unpack = 5 # With sample unpacking
pages_per_eval_pack = 18

timestamp_epsilon_experiment_start_block = BLOCK_3B_7BSTAR_UNPACK
Expand All @@ -227,9 +226,8 @@
# validator eval batch min to keep for next loop.
sample_min = 5
# Max number of uids that can be either pending eval or currently being evaluated.
updated_models_limit = 15
# validator incentive threshold to prioritize updates. All incentives add up to 1.
update_priority_incentive_threshold = 0.01
# We allow the sample_min per competition + 10 additional models to be held at any one time.
updated_models_limit = sample_min * len(MODEL_CONSTRAINTS_BY_COMPETITION_ID) + 10
# time required between updates to the chain.
chain_update_cadence = dt.timedelta(minutes=20)
# time required between retrying evaluation of a stale model. (First retry will be immediate).
Expand Down
6 changes: 4 additions & 2 deletions neurons/validator.py
Original file line number Diff line number Diff line change
Expand Up @@ -911,11 +911,13 @@ async def run_step(self):
# Prioritize models for keeping up to the sample_min for the next eval loop.
# If the model has any significant weight, prioritize by weight with greater weights being kept first.
# Then for the unweighted models, prioritize by win_rate.
# Use the competition weights from the tracker which also handles moving averages.
tracker_competition_weights = self.competition_tracker.get_competition_weights(competition.id)
model_prioritization = {
uid: (
# Add 1 to ensure it is always greater than a win rate.
1 + self.weights[uid].item()
if self.weights[uid].item() >= 0.001
1 + tracker_competition_weights[uid].item()
if tracker_competition_weights[uid].item() >= 0.001
else wr
)
for uid, wr in win_rate.items()
Expand Down

0 comments on commit cb888b4

Please sign in to comment.