Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 10 additions & 11 deletions neurons/validator.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,16 +124,6 @@ def schedule_cycle(
)
delay = (next_cycle - get_current_time()).total_seconds()

# Schedule the launch of high frequency prompt
high_frequency_launch = datetime(
2025, 12, 2, 18, 0, 0, tzinfo=timezone.utc
)
if (
prompt_config.label == HIGH_FREQUENCY.label
and get_current_time() <= high_frequency_launch
):
return

bt.logging.info(
f"Scheduling next {prompt_config.label} frequency cycle for asset {asset} in {delay} seconds"
)
Expand All @@ -154,7 +144,6 @@ def cycle_low_frequency(self, asset: str):
bt.logging.info(f"starting the {LOW_FREQUENCY.label} frequency cycle")
cycle_start_time = get_current_time()

self.sync()
# update the miners, also for the high frequency prompt that will use the same list
self.miner_uids = get_available_miners_and_update_metagraph_history(
base_neuron=self,
Expand All @@ -163,10 +152,20 @@ def cycle_low_frequency(self, asset: str):
self.forward_prompt(asset, LOW_FREQUENCY)
self.forward_score_low_frequency()
# self.cleanup_history()
self.sync()
self.schedule_cycle(cycle_start_time, LOW_FREQUENCY)

def cycle_high_frequency(self, asset: str):
cycle_start_time = get_current_time()

# Schedule the launch of high frequency prompt
high_frequency_launch = datetime(
2025, 12, 2, 18, 0, 0, tzinfo=timezone.utc
)
if cycle_start_time <= high_frequency_launch:
self.schedule_cycle(cycle_start_time, HIGH_FREQUENCY)
return

self.forward_prompt(asset, HIGH_FREQUENCY)

current_time = get_current_time()
Expand Down
3 changes: 2 additions & 1 deletion synth/base/dendrite.py
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,8 @@ def log_exception(exception: Exception):
ValidationError,
),
):
bt.logging.trace(f"{error_type}#{error_id}: {exception}")
# bt.logging.trace(f"{error_type}#{error_id}: {exception}")
pass
else:
bt.logging.error(f"{error_type}#{error_id}: {exception}")
traceback.print_exc(file=sys.stderr)
12 changes: 6 additions & 6 deletions synth/base/dendrite_multiprocess.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,9 +169,9 @@ async def call(
synapse.dendrite.signature = signature

try:
bt.logging.trace(
f"dendrite | --> | {synapse.get_total_size()} B | {synapse.name} | {synapse.axon.hotkey} | {synapse.axon.ip}:{str(synapse.axon.port)} | 0 | Success"
)
# bt.logging.trace(
# f"dendrite | --> | {synapse.get_total_size()} B | {synapse.name} | {synapse.axon.hotkey} | {synapse.axon.ip}:{str(synapse.axon.port)} | 0 | Success"
# )
response = await client.post(
url=url,
headers=synapse.to_headers(),
Expand All @@ -189,9 +189,9 @@ async def call(
synapse = process_error_message(synapse, REQUEST_NAME, e)

finally:
bt.logging.trace(
f"dendrite | <-- | {synapse.get_total_size()} B | {synapse.name} | {synapse.axon.hotkey} | {synapse.axon.ip}:{str(synapse.axon.port)} | {synapse.dendrite.status_code} | {synapse.dendrite.status_message}"
)
# bt.logging.trace(
# f"dendrite | <-- | {synapse.get_total_size()} B | {synapse.name} | {synapse.axon.hotkey} | {synapse.axon.ip}:{str(synapse.axon.port)} | {synapse.dendrite.status_code} | {synapse.dendrite.status_message}"
# )

return [synapse.simulation_output, synapse.dendrite.process_time]

Expand Down
2 changes: 1 addition & 1 deletion synth/base/neuron.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ def sync(self):
# in the run() method. This to save to database the result of the set_weights.

# Always save state.
# self.save_state()
self.save_state()

def check_registered(self):
# --- Check for registration.
Expand Down
Loading