@@ -84,12 +84,15 @@ def serve_axon(self):
84
84
pass
85
85
86
86
except Exception as e :
87
- bt .logging .error (f"Failed to create Axon initialize with exception: { e } " )
87
+ bt .logging .error (
88
+ f"Failed to create Axon initialize with exception: { e } "
89
+ )
88
90
pass
89
91
90
92
async def concurrent_forward (self ):
91
93
coroutines = [
92
- self .forward () for _ in range (self .config .neuron .num_concurrent_forwards )
94
+ self .forward ()
95
+ for _ in range (self .config .neuron .num_concurrent_forwards )
93
96
]
94
97
await asyncio .gather (* coroutines )
95
98
@@ -148,7 +151,9 @@ def run(self):
148
151
# In case of unforeseen errors, the validator will log the error and continue operations.
149
152
except Exception as err :
150
153
bt .logging .error ("Error during validation" , str (err ))
151
- bt .logging .debug (print_exception (type (err ), err , err .__traceback__ ))
154
+ bt .logging .debug (
155
+ print_exception (type (err ), err , err .__traceback__ )
156
+ )
152
157
153
158
def run_in_background_thread (self ):
154
159
"""
@@ -268,7 +273,9 @@ def resync_metagraph(self):
268
273
# If so, we need to add new hotkeys and moving averages.
269
274
if len (self .hotkeys ) < len (self .metagraph .hotkeys ):
270
275
# Update the size of the moving average scores.
271
- new_moving_average = torch .zeros ((self .metagraph .n )).to (self .device )
276
+ new_moving_average = torch .zeros ((self .metagraph .n )).to (
277
+ self .device
278
+ )
272
279
min_len = min (len (self .hotkeys ), len (self .scores ))
273
280
new_moving_average [:min_len ] = self .scores [:min_len ]
274
281
self .scores = new_moving_average
0 commit comments