@@ -85,7 +85,7 @@ def __init__(self, config=None):
85
85
else :
86
86
self .wallet = bt .wallet (config = self .config )
87
87
self .subtensor = bt .subtensor (config = self .config )
88
- self .metagraph = self .subtensor .metagraph (self .config .netuid , lite = False )
88
+ self .metagraph = self .subtensor .metagraph (self .config .netuid , lite = False )
89
89
90
90
# Check OpenMM version if we are not in mock mode.
91
91
self .check_openmm_version ()
@@ -126,9 +126,7 @@ def check_openmm_version(self):
126
126
127
127
def setup_wandb_logging (self ):
128
128
if os .path .isfile (f"{ self .config .neuron .full_path } /wandb_ids.pkl" ):
129
- self .wandb_ids = load_pkl (
130
- f"{ self .config .neuron .full_path } /wandb_ids.pkl" , "rb"
131
- )
129
+ self .wandb_ids = load_pkl (f"{ self .config .neuron .full_path } /wandb_ids.pkl" , "rb" )
132
130
else :
133
131
self .wandb_ids = {}
134
132
@@ -161,7 +159,7 @@ def sync(self):
161
159
self .save_state ()
162
160
163
161
def weight_setter (self ):
164
- """ method to set weights for the validator. """
162
+ """method to set weights for the validator."""
165
163
try :
166
164
logger .info ("Attempting to set weights..." )
167
165
weights_are_set = self .set_weights ()
@@ -188,9 +186,7 @@ def should_sync_metagraph(self):
188
186
"""
189
187
Check if enough epoch blocks have elapsed since the last checkpoint to sync.
190
188
"""
191
- return (
192
- self .block - self .metagraph .last_update [self .uid ]
193
- ) > self .config .neuron .metagraph_resync_length
189
+ return (self .block - self .metagraph .last_update [self .uid ]) > self .config .neuron .metagraph_resync_length
194
190
195
191
def should_set_weights (self ) -> bool :
196
192
# Don't set weights on initialization.
@@ -206,9 +202,7 @@ def should_set_weights(self) -> bool:
206
202
return False
207
203
208
204
# Define appropriate logic for when set weights.
209
- return (
210
- self .block - self .metagraph .last_update [self .uid ]
211
- ) > self .config .neuron .epoch_length
205
+ return (self .block - self .metagraph .last_update [self .uid ]) > self .config .neuron .epoch_length
212
206
213
207
def save_state (self ):
214
208
pass
0 commit comments