Skip to content

Commit

Permalink
add access token
Browse files Browse the repository at this point in the history
  • Loading branch information
surcyf123 committed Jan 10, 2024
1 parent 0830265 commit 5bfbf31
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion start_validator.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

def update_and_restart(pm2_name, wallet_name, wallet_hotkey, address, autoupdate):
global current_version
subprocess.run(["pm2", "start", "validators/validator.py", "--interpreter", "python3", "--name", pm2_name, "--", "--wallet.name", wallet_name, "--wallet.hotkey", wallet_hotkey, "--netuid", "18", "--subtensor.network", "local", "--subtensor.chain_endpoint", address])
subprocess.run(["pm2", "start", "validators/validator.py", "--interpreter", "python3", "--name", pm2_name, "--", "--wallet.name", wallet_name, "--wallet.hotkey", wallet_hotkey, "--netuid", "18", "--subtensor.network", "local", "--subtensor.chain_endpoint", address, "--logging.debug"])
while True:
latest_version = get_version()
print(f"Current version: {current_version}")
Expand Down
2 changes: 1 addition & 1 deletion state.json

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions validators/image_validator.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ async def start_query(self, available_uids, metagraph):
uid_to_question = {}

# Randomly choose the provider based on specified probabilities
providers = ["OpenAI"] * 5 + ["Stability"] * 5
providers = ["OpenAI"] * 3 + ["Stability"] * 7
self.provider = random.choice(providers)

if self.provider == "Stability":
Expand Down Expand Up @@ -109,7 +109,7 @@ async def score_responses(self, query_responses, uid_to_question, metagraph):
download_tasks = []
score_tasks = []
rand = random.random()
will_score_all = rand < 1/1
will_score_all = rand < 1/5
bt.logging.info(f"random number = {rand}, will score all = {will_score_all}")
async with aiohttp.ClientSession() as session:
for uid, syn in query_responses:
Expand Down
2 changes: 1 addition & 1 deletion validators/text_validator.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ async def start_query(self, available_uids, metagraph) -> tuple[list, dict]:
query_tasks = []
uid_to_question = {}
# Randomly choose the provider based on specified probabilities
providers = ["OpenAI"] * 5 + ["Anthropic"] * 5
providers = ["OpenAI"] * 2 + ["Anthropic"] * 8
self.provider = random.choice(providers)

if self.provider == "Anthropic":
Expand Down
2 changes: 1 addition & 1 deletion validators/validator.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
# organic requests are scored, the tasks are stored in this queue
# for later being consumed by `query_synapse` cycle:
organic_scoring_tasks = set()
EXPECTED_ACCESS_KEY = env('EXPECTED_ACCESS_KEY', default='hello')
EXPECTED_ACCESS_KEY = env('EXPECTED_ACCESS_KEY')


def get_config() -> bt.config:
Expand Down

0 comments on commit 5bfbf31

Please sign in to comment.