Skip to content

Commit 58dca96

Browse files
authored
Develop (#113)
* Rework auto restart (#111) * run validtor with no thread * remove should exit in except * remove log that causes errors * Shuffle miners (#110) * wordings * shuffle miners globally * CI: trigger on PR on develop
1 parent d6555cd commit 58dca96

File tree

5 files changed

+5
-9
lines changed

5 files changed

+5
-9
lines changed

.github/workflows/ci.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ on:
77
pull_request:
88
branches:
99
- main
10+
- develop
1011

1112
jobs:
1213
ci:

neurons/validator.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,4 @@ async def forward(self):
102102

103103
# The main function parses the configuration and runs the validator.
104104
if __name__ == "__main__":
105-
with Validator() as validator:
106-
while not validator.should_exit:
107-
bt.logging.info(f"Validator running... {time.time()}")
108-
time.sleep(600)
105+
Validator().run()

synth/base/validator.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -138,8 +138,6 @@ def run(self):
138138
# This loop maintains the validator's operations until intentionally stopped.
139139
try:
140140
while True:
141-
bt.logging.info(f"step({self.step}) block({self.block})")
142-
143141
# Run multiple forwards concurrently.
144142
self.loop.run_until_complete(self.concurrent_forward())
145143

@@ -164,8 +162,6 @@ def run(self):
164162
bt.logging.debug(
165163
str(print_exception(type(err), err, err.__traceback__))
166164
)
167-
bt.logging.debug("Scheduling validator to stop.")
168-
self.should_exit = True
169165

170166
def run_in_background_thread(self):
171167
"""

synth/utils/logging.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ def emit(self, record):
5151
)
5252
except Exception as err:
5353
bt.logging.warning(
54-
f"Error occurred while sending alert to wandb: ---{str(err)}--- then message: ---{log_entry}---"
54+
f"Error occurred while sending alert to wandb: ---{str(err)}--- the message: ---{log_entry}---"
5555
)
5656
bt.logging.warning(
5757
str(print_exception(type(err), err, err.__traceback__))

synth/validator/forward.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -378,6 +378,8 @@ def _get_available_miners_and_update_metagraph_history(
378378
if len(metagraph_info) > 0:
379379
miner_data_handler.update_metagraph_history(metagraph_info)
380380

381+
random.shuffle(miner_uids)
382+
381383
return miner_uids
382384

383385

0 commit comments

Comments
 (0)