diff --git a/precog/validators/weight_setter.py b/precog/validators/weight_setter.py index c8de0eb..7d07e20 100755 --- a/precog/validators/weight_setter.py +++ b/precog/validators/weight_setter.py @@ -27,7 +27,7 @@ def __init__(self, config=None, loop=None): self.prediction_interval = self.config.prediction_interval # in minutes self.N_TIMEPOINTS = self.config.N_TIMEPOINTS # number of timepoints to predict self.last_sync = 0 - self.set_weights_rate = 150 # in blocks + self.set_weights_rate = 100 # in blocks self.resync_metagraph_rate = 600 # in seconds bt.logging.info( f"Running validator for subnet: {self.config.netuid} on network: {self.config.subtensor.network}" @@ -41,6 +41,7 @@ def __init__(self, config=None, loop=None): self.save_state() else: self.load_state() + self.current_block = self.subtensor.get_current_block() self.blocks_since_last_update = self.subtensor.blocks_since_last_update( netuid=self.config.netuid, uid=self.my_uid ) @@ -118,6 +119,7 @@ async def set_weights(self): self.blocks_since_last_update = self.subtensor.blocks_since_last_update( netuid=self.config.netuid, uid=self.my_uid ) + self.current_block = self.subtensor.get_current_block() except Exception: bt.logging.error("Failed to get current block, skipping block update") if self.blocks_since_last_update >= self.set_weights_rate: