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
12 changes: 6 additions & 6 deletions neurons/validator.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,13 +64,13 @@ async def spawn_loops(task_queue, scoring_queue, reward_events):
logger.info("Starting WeightSetter...")
asyncio.create_task(weight_setter.start(reward_events))

# while True:
# await asyncio.sleep(5)
while True:
await asyncio.sleep(5)

# # Check if all tasks are still running
# logger.debug(f"Number of tasks in Task Queue: {len(task_queue)}")
# logger.debug(f"Number of tasks in Scoring Queue: {len(scoring_queue)}")
# logger.debug(f"Number of tasks in Reward Events: {len(reward_events)}")
# Check if all tasks are still running
logger.debug(f"Number of tasks in Task Queue: {len(task_queue)}")
logger.debug(f"Number of tasks in Scoring Queue: {len(scoring_queue)}")
logger.debug(f"Number of tasks in Reward Events: {len(reward_events)}")

asyncio.run(spawn_loops(task_queue, scoring_queue, reward_events))

Expand Down
17 changes: 8 additions & 9 deletions prompting/llms/hf_llm.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import numpy as np
import torch
from loguru import logger
from transformers import AutoModelForCausalLM, AutoTokenizer, PreTrainedModel, pipeline

from shared.settings import shared_settings
Expand Down Expand Up @@ -62,14 +61,14 @@ def generate(self, messages: list[str] | list[dict], sampling_params=None, seed=
skip_special_tokens=True,
)[0]

logger.debug(
f"""{self.__class__.__name__} queried:
prompt: {messages}\n
responses: {results}\n
sampling params: {params}\n
seed: {seed}
"""
)
# logger.debug(
# f"""{self.__class__.__name__} queried:
# prompt: {messages}\n
# responses: {results}\n
# sampling params: {params}\n
# seed: {seed}
# """
# )

return results if len(results) > 1 else results[0]

Expand Down
4 changes: 2 additions & 2 deletions shared/epistula.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,8 +152,8 @@ async def query_miners(
logger.error(f"Unknown response type: {response}")
results.append(SynapseStreamResult(uid=uid, exception=f"Unknown response type: {response}"))
return results
except Exception as e:
logger.error(f"Error in query_miners: {e}")
except Exception:
# logger.error(f"Error in query_miners: {e}")
return []


Expand Down