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
26 changes: 12 additions & 14 deletions bittensor/core/async_subtensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -1403,15 +1403,15 @@ async def register(

async def pow_register(
self: "AsyncSubtensor",
wallet: Wallet,
netuid,
processors,
update_interval,
output_in_place,
verbose,
use_cuda,
dev_id,
threads_per_block,
wallet: "Wallet",
netuid: int,
processors: int,
update_interval: int,
output_in_place: bool,
verbose: bool,
use_cuda: bool,
dev_id: Union[list[int], int],
threads_per_block: int,
):
"""Register neuron."""
return await register_extrinsic(
Expand Down Expand Up @@ -1462,11 +1462,9 @@ async def set_weights(
retries = 0
success = False
message = "No attempt made. Perhaps it is too soon to set weights!"
while (
await self.blocks_since_last_update(netuid, uid)
> await self.weights_rate_limit(netuid)
and retries < max_retries
):
while retries < max_retries and await self.blocks_since_last_update(
netuid, uid
) > await self.weights_rate_limit(netuid):
try:
logging.info(
f"Setting weights for subnet #<blue>{netuid}</blue>. Attempt <blue>{retries + 1} of {max_retries}</blue>."
Expand Down
Loading