From 689d08d7c5141e35a3958c812e7ed24ed3ffd174 Mon Sep 17 00:00:00 2001 From: Sid Date: Wed, 13 Nov 2024 09:41:59 -0800 Subject: [PATCH 1/2] Ensure 14B* winners are kept in sample_min. --- neurons/validator.py | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/neurons/validator.py b/neurons/validator.py index 48f935db..e0419bfb 100644 --- a/neurons/validator.py +++ b/neurons/validator.py @@ -878,7 +878,7 @@ async def run_step(self): # Use sample packing. pack_samples = True pages_per_eval = constants.pages_per_eval_pack - + # Try to synchronize the data used by validators. try: seed = metagraph_utils.get_hash_of_sync_block( @@ -925,7 +925,7 @@ async def run_step(self): ) bt.logging.debug(f"14b* Batch size is {len(batches_14b_star[0])}") - #This is useful for logging to wandb + # This is useful for logging to wandb pages_14b_star = dataloader_14b_star.get_page_names() bt.logging.debug(f"14b* Pages used are {pages_14b_star}") @@ -1057,6 +1057,11 @@ async def run_step(self): competition=competition_14b_star, ) ) + # Since we choose the models to keep based on weight only if they are in the win_rate dict, + # We need to add anything only winning in 14B* to it. We use a wr of 0 so it is only based on weight. + win_rate.update( + {key: 0.0 for key in win_rate_14b_star if key not in win_rate} + ) # Get ids for all competitions in the schedule. active_competition_ids = set([comp.id for comp in competition_schedule]) @@ -1333,9 +1338,9 @@ def log_step( for dataset_name, avg_loss in ( uid_to_state[uid].avg_loss_per_dataset().items() ): - step_log["uid_data"][str(uid)]["dataset_perf"][ - f"{dataset_name}" - ] = {'average_loss': avg_loss} + step_log["uid_data"][str(uid)]["dataset_perf"][f"{dataset_name}"] = { + "average_loss": avg_loss + } table = Table(title="Step", expand=True) table.add_column("uid", justify="right", style="cyan", no_wrap=True) table.add_column("hf", style="magenta", overflow="fold") From 79015a3334aa2fcb9eda19e13298c0441560797f Mon Sep 17 00:00:00 2001 From: Sid Date: Wed, 13 Nov 2024 10:00:40 -0800 Subject: [PATCH 2/2] Bump version to 4.6.1. --- constants/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/constants/__init__.py b/constants/__init__.py index ec75ffd2..fa6cd716 100644 --- a/constants/__init__.py +++ b/constants/__init__.py @@ -34,7 +34,7 @@ # --------------------------------- # Release -__version__ = "4.6.0" +__version__ = "4.6.1" # Validator schema version __validator_version__ = "4.6.0"