Skip to content

Commit

Permalink
remove logger
Browse files Browse the repository at this point in the history
  • Loading branch information
surcyf123 committed Jan 4, 2024
1 parent ed1a71e commit cabde0a
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions validators/weight_setter.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
import bittensor as bt
import torch
import wandb
from bittensor.btlogging import logger

from template.protocol import IsAlive
from text_validator import TextValidator
Expand All @@ -23,7 +22,7 @@ async def wait_for_coro_with_limit(coro, timeout: int) -> Tuple[bool, object]:
try:
result = await asyncio.wait_for(coro, timeout)
except asyncio.TimeoutError:
logger.error('scoring task timed out')
bt.logging.error('scoring task timed out')
return False, None
return True, result

Expand Down Expand Up @@ -59,7 +58,7 @@ async def consume_organic_scoring(self):
return_when=asyncio.FIRST_COMPLETED)
for task in completed:
if task.exception():
logger.error(
bt.logging.error(
f'Encountered in {TextValidator.score_responses.__name__} task:\n'
f'{"".join(traceback.format_exception(task.exception()))}'
)
Expand All @@ -72,7 +71,7 @@ async def consume_organic_scoring(self):
else:
await asyncio.sleep(1)
except Exception as e:
logger.error(f'Encountered in {self.consume_organic_scoring.__name__} loop:\n{traceback.format_exc()}')
bt.logging.error(f'Encountered in {self.consume_organic_scoring.__name__} loop:\n{traceback.format_exc()}')
await asyncio.sleep(10)

async def perform_synthetic_scoring_and_update_weights(self):
Expand Down

0 comments on commit cabde0a

Please sign in to comment.