From 58721d5f0bb2e523d076f031e68c9b97a691e5b8 Mon Sep 17 00:00:00 2001 From: Giga Chkhikvadze Date: Sat, 3 Feb 2024 18:50:13 +0400 Subject: [PATCH 01/24] feat: scoring method --- template/__init__.py | 2 +- validators/text_validator.py | 28 ++++++++++++++++++++++++++++ validators/validator.py | 20 ++++++++++++++++++++ 3 files changed, 49 insertions(+), 1 deletion(-) diff --git a/template/__init__.py b/template/__init__.py index 1d81c906..0a820c53 100644 --- a/template/__init__.py +++ b/template/__init__.py @@ -46,7 +46,7 @@ # must have the test_key whitelisted to avoid a global blacklist testnet_key = ["5EhEZN6soubtKJm8RN7ANx9FGZ2JezxBUFxr45cdsHtDp3Uk"] test_key = ["5DcRHcCwD33YsHfj4PX5j2evWLniR1wSWeNmpf5RXaspQT6t"] -valid_validators = ['5FFApaS75bv5pJHfAp2FVLBj9ZaXuFDjEypsaBNc1wCfe52v', '5EhvL1FVkQPpMjZX4MAADcW42i3xPSF1KiCpuaxTYVr28sux', '5CXRfP2ekFhe62r7q3vppRajJmGhTi7vwvb2yr79jveZ282w', '5CaNj3BarTHotEK1n513aoTtFeXcjf6uvKzAyzNuv9cirUoW', '5HK5tp6t2S59DywmHRWPBVJeJ86T61KjurYqeooqj8sREpeN', '5DvTpiniW9s3APmHRYn8FroUWyfnLtrsid5Mtn5EwMXHN2ed', '5G3f8VDTT1ydirT3QffnV2TMrNMR2MkQfGUubQNqZcGSj82T', '5Dz8ShM6rtPw1GBAaqxjycT9LF1TC3iDpzpUH9gKr85Nizo6', '5Hddm3iBFD2GLT5ik7LZnT3XJUnRnN8PoeCFgGQgawUVKNm8', '5HNQURvmjjYhTSksi8Wfsw676b4owGwfLR2BFAQzG7H3HhYf', '5HEo565WAy4Dbq3Sv271SAi7syBSofyfhhwRNjFNSM2gP9M2', '5F4tQyWrhfGVcNhoqeiNsR6KjD4wMZ2kfhLj4oHYuyHbZAc3'] +valid_validators = ['5FFApaS75bv5pJHfAp2FVLBj9ZaXuFDjEypsaBNc1wCfe52v', '5EhvL1FVkQPpMjZX4MAADcW42i3xPSF1KiCpuaxTYVr28sux', '5CXRfP2ekFhe62r7q3vppRajJmGhTi7vwvb2yr79jveZ282w', '5CaNj3BarTHotEK1n513aoTtFeXcjf6uvKzAyzNuv9cirUoW', '5HK5tp6t2S59DywmHRWPBVJeJ86T61KjurYqeooqj8sREpeN', '5DvTpiniW9s3APmHRYn8FroUWyfnLtrsid5Mtn5EwMXHN2ed', '5G3f8VDTT1ydirT3QffnV2TMrNMR2MkQfGUubQNqZcGSj82T', '5Dz8ShM6rtPw1GBAaqxjycT9LF1TC3iDpzpUH9gKr85Nizo6', '5Hddm3iBFD2GLT5ik7LZnT3XJUnRnN8PoeCFgGQgawUVKNm8', '5HNQURvmjjYhTSksi8Wfsw676b4owGwfLR2BFAQzG7H3HhYf', '5HEo565WAy4Dbq3Sv271SAi7syBSofyfhhwRNjFNSM2gP9M2', '5F4tQyWrhfGVcNhoqeiNsR6KjD4wMZ2kfhLj4oHYuyHbZAc3', '5H66kJAzBCv2DC9poHATLQqyt3ag8FLSbHf6rMqTiRcS52rc'] WHITELISTED_KEYS = testnet_key + test_key + valid_validators BLACKLISTED_KEYS = ["5G1NjW9YhXLadMWajvTkfcJy6up3yH2q1YzMXDTi6ijanChe"] diff --git a/validators/text_validator.py b/validators/text_validator.py index 722fffa7..c5e1291a 100644 --- a/validators/text_validator.py +++ b/validators/text_validator.py @@ -39,6 +39,34 @@ async def organic(self, metagraph, query): async for response in self.return_tokens(uid, responses): yield response + async def organic_scoring(self, metagraph, available_uids, messages): + query_tasks = [] + uid_to_question = {} + if len(messages) <= len(available_uids): + random_uids = random.sample(list(available_uids.keys()), len(messages)) + else: + random_uids = [random.choice(list(available_uids.keys())) for _ in range(len(messages))] + for message_dict, uid in zip(messages, random_uids): # Iterate over each dictionary in the list and random_uids + (key, message_list), = message_dict.items() + prompt = message_list[-1]['content'] + uid_to_question[uid] = prompt + message = message_list + syn = StreamPrompting(messages=message, model=self.model, seed=self.seed) + bt.logging.info(f"Sending {syn.model} {self.query_type} request to uid: {uid}, timeout {self.timeout}: {message[0]['content']}") + task = self.query_miner(metagraph.axons[uid], uid, syn) + query_tasks.append(task) + self.wandb_data["prompts"][uid] = prompt + + query_responses = await asyncio.gather(*query_tasks) + await self.score_responses(query_responses, uid_to_question, metagraph) + + result = {} + for (_, value), message_dict in zip(query_responses, messages): + (key, message_list), = message_dict.items() + result[key] = value + + return result + async def return_tokens(self, uid, responses): async for resp in responses: if isinstance(resp, str): diff --git a/validators/validator.py b/validators/validator.py index add662af..2e235b46 100644 --- a/validators/validator.py +++ b/validators/validator.py @@ -31,6 +31,8 @@ app = FastAPI() EXPECTED_ACCESS_KEY = "hello" +VALIDATOR_ACCESS_KEY = os.environ.get('VALIDATOR_ACCESS_KEY') + def get_config(): parser = argparse.ArgumentParser() @@ -76,6 +78,7 @@ def init_wandb(config, my_uid, wallet): def initialize_components(config): global metagraph + global dendrite bt.logging(config=config, logging_dir=config.full_path) bt.logging.info(f"Running validator for subnet: {config.netuid} on network: {config.subtensor.chain_endpoint}") wallet = bt.wallet(config=config) @@ -218,6 +221,21 @@ async def response_stream(): return StreamingResponse(response_stream()) +@app.post("/scoring") +async def organic_scoring(request: Request, data: dict): + # Check access key + access_key = request.headers.get("access-key") + if access_key != VALIDATOR_ACCESS_KEY: + raise HTTPException(status_code=401, detail="Invalid access key") + messages = data.get('messages') + config = get_config() + wallet = bt.wallet(config=config) + dendrite = bt.dendrite(wallet=wallet) + available_uids = await get_available_uids(dendrite, metagraph) + responses = await text_vali.organic_scoring(metagraph, available_uids, messages) + + return responses + def run_fastapi(): uvicorn.run(app, host="0.0.0.0", port=8000) @@ -232,6 +250,8 @@ def main(): } initialize_validators(validator_config) init_wandb(config, my_uid, wallet) + run_fastapi() + try: asyncio.run(query_synapse(dendrite, subtensor, config, wallet)) From 99d9a236c00d1c76c452458eebc9497c42f98750 Mon Sep 17 00:00:00 2001 From: Giga Chkhikvadze Date: Sat, 3 Feb 2024 19:53:16 +0400 Subject: [PATCH 02/24] fix organic scoring --- validators/text_validator.py | 4 ++-- validators/validator.py | 30 +++++++++++++----------------- 2 files changed, 15 insertions(+), 19 deletions(-) diff --git a/validators/text_validator.py b/validators/text_validator.py index 24b34cca..7486340e 100644 --- a/validators/text_validator.py +++ b/validators/text_validator.py @@ -69,9 +69,9 @@ async def organic_scoring(self, metagraph, available_uids, messages): prompt = message_list[-1]['content'] uid_to_question[uid] = prompt message = message_list - syn = StreamPrompting(messages=message, model=self.model, seed=self.seed) + syn = StreamPrompting(messages=message_list, model=self.model, seed=self.seed, max_tokens=4048, temperature=self.temperature, provider=self.provider, top_p=self.top_p, top_k=self.top_k) bt.logging.info(f"Sending {syn.model} {self.query_type} request to uid: {uid}, timeout {self.timeout}: {message[0]['content']}") - task = self.query_miner(metagraph.axons[uid], uid, syn) + task = self.query_miner(metagraph, uid, syn) query_tasks.append(task) self.wandb_data["prompts"][uid] = prompt diff --git a/validators/validator.py b/validators/validator.py index 36ad35dd..3bb2ed20 100644 --- a/validators/validator.py +++ b/validators/validator.py @@ -38,8 +38,6 @@ organic_scoring_tasks = set() EXPECTED_ACCESS_KEY = os.environ.get('EXPECTED_ACCESS_KEY', "hello") -VALIDATOR_ACCESS_KEY = os.environ.get('VALIDATOR_ACCESS_KEY') - def get_config() -> bt.config: parser = argparse.ArgumentParser() @@ -150,29 +148,27 @@ async def process_text_validator(request: web.Request): return response - -async def organic_scoring(request: web.Request, data: dict): - # Check access key - access_key = request.headers.get("access-key") - if access_key != VALIDATOR_ACCESS_KEY: - raise HTTPException(status_code=401, detail="Invalid access key") - messages = data.get('messages') - config = get_config() - wallet = bt.wallet(config=config) - dendrite = bt.dendrite(wallet=wallet) - available_uids = await get_available_uids(dendrite, metagraph) - responses = await text_vali.organic_scoring(metagraph, available_uids, messages) - - return responses - class ValidatorApplication(web.Application): def __init__(self, *a, **kw): super().__init__(*a, **kw) self.weight_setter: WeightSetter | None = None +async def organic_scoring(request: web.Request): + # Check access key + # access_key = request.headers.get("access-key") + # if access_key != EXPECTED_ACCESS_KEY: + # raise web.Response(status_code=401, detail="Invalid access key") + body = await request.json() + messages = body['messages'] + available_uids = await validator_app.weight_setter.get_available_uids() + + responses = await text_vali.organic_scoring(metagraph, available_uids, messages) + + return web.json_response(responses) validator_app = ValidatorApplication() validator_app.add_routes([web.post('/text-validator/', process_text_validator)]) +validator_app.add_routes([web.post('/scoring/', organic_scoring)]) def main(run_aio_app=True, test=False) -> None: From e2b4f8652bd21884315c6e18bf837a799e95908b Mon Sep 17 00:00:00 2001 From: Giga Chkhikvadze Date: Sat, 3 Feb 2024 19:54:59 +0400 Subject: [PATCH 03/24] fix global dentire --- validators/validator.py | 1 - 1 file changed, 1 deletion(-) diff --git a/validators/validator.py b/validators/validator.py index 3bb2ed20..1530c99f 100644 --- a/validators/validator.py +++ b/validators/validator.py @@ -89,7 +89,6 @@ def init_wandb(config, my_uid, wallet: bt.wallet): def initialize_components(config: bt.config): global metagraph - global dendrite bt.logging(config=config, logging_dir=config.full_path) bt.logging.info(f"Running validator for subnet: {config.netuid} on network: {config.subtensor.chain_endpoint}") wallet = bt.wallet(config=config) From ccdfbe75d88a5d7a37c3d359972527d5ee412d52 Mon Sep 17 00:00:00 2001 From: Giga Chkhikvadze Date: Mon, 5 Feb 2024 00:03:08 +0400 Subject: [PATCH 04/24] fix: scoring route --- validators/validator.py | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/validators/validator.py b/validators/validator.py index 1530c99f..99472d7e 100644 --- a/validators/validator.py +++ b/validators/validator.py @@ -153,17 +153,21 @@ def __init__(self, *a, **kw): self.weight_setter: WeightSetter | None = None async def organic_scoring(request: web.Request): - # Check access key - # access_key = request.headers.get("access-key") - # if access_key != EXPECTED_ACCESS_KEY: - # raise web.Response(status_code=401, detail="Invalid access key") - body = await request.json() - messages = body['messages'] - available_uids = await validator_app.weight_setter.get_available_uids() + try: + # Check access key + access_key = request.headers.get("access-key") + if access_key != EXPECTED_ACCESS_KEY: + raise web.Response(status_code=401, detail="Invalid access key") + body = await request.json() + messages = body['messages'] + available_uids = await validator_app.weight_setter.get_available_uids() - responses = await text_vali.organic_scoring(metagraph, available_uids, messages) + responses = await text_vali.organic_scoring(metagraph, available_uids, messages) - return web.json_response(responses) + return web.json_response(responses) + except Exception as e: + bt.logging.error(f'Organic scoring error: ${e}') + await web.Response(status_code=400, detail="{e}") validator_app = ValidatorApplication() validator_app.add_routes([web.post('/text-validator/', process_text_validator)]) From 3562ce6c562e851ed74c6f9d1563de2ab8d13119 Mon Sep 17 00:00:00 2001 From: Giga Chkhikvadze Date: Mon, 5 Feb 2024 14:24:20 +0400 Subject: [PATCH 05/24] fix: max token --- validators/text_validator.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/validators/text_validator.py b/validators/text_validator.py index 7486340e..309e332d 100644 --- a/validators/text_validator.py +++ b/validators/text_validator.py @@ -69,7 +69,7 @@ async def organic_scoring(self, metagraph, available_uids, messages): prompt = message_list[-1]['content'] uid_to_question[uid] = prompt message = message_list - syn = StreamPrompting(messages=message_list, model=self.model, seed=self.seed, max_tokens=4048, temperature=self.temperature, provider=self.provider, top_p=self.top_p, top_k=self.top_k) + syn = StreamPrompting(messages=message_list, model=self.model, seed=self.seed, max_tokens=8096, temperature=self.temperature, provider=self.provider, top_p=self.top_p, top_k=self.top_k) bt.logging.info(f"Sending {syn.model} {self.query_type} request to uid: {uid}, timeout {self.timeout}: {message[0]['content']}") task = self.query_miner(metagraph, uid, syn) query_tasks.append(task) From 8db7b5b63e42a77a74b24d35de299f32373d81c4 Mon Sep 17 00:00:00 2001 From: Giga Chkhikvadze Date: Mon, 5 Feb 2024 17:46:49 +0400 Subject: [PATCH 06/24] fix: model for scoring --- validators/text_validator.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/validators/text_validator.py b/validators/text_validator.py index 309e332d..cc0277fb 100644 --- a/validators/text_validator.py +++ b/validators/text_validator.py @@ -69,7 +69,7 @@ async def organic_scoring(self, metagraph, available_uids, messages): prompt = message_list[-1]['content'] uid_to_question[uid] = prompt message = message_list - syn = StreamPrompting(messages=message_list, model=self.model, seed=self.seed, max_tokens=8096, temperature=self.temperature, provider=self.provider, top_p=self.top_p, top_k=self.top_k) + syn = StreamPrompting(messages=message_list, model='gpt-4-turbo-preview', seed=self.seed, max_tokens=8096, temperature=self.temperature, provider=self.provider, top_p=self.top_p, top_k=self.top_k) bt.logging.info(f"Sending {syn.model} {self.query_type} request to uid: {uid}, timeout {self.timeout}: {message[0]['content']}") task = self.query_miner(metagraph, uid, syn) query_tasks.append(task) From da434590c5cd1c98d796f07abd659c573f6811cc Mon Sep 17 00:00:00 2001 From: Giga Chkhikvadze Date: Mon, 12 Feb 2024 14:38:09 +0400 Subject: [PATCH 07/24] fix: model on scoring --- validators/text_validator.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/validators/text_validator.py b/validators/text_validator.py index cc0277fb..d06610f8 100644 --- a/validators/text_validator.py +++ b/validators/text_validator.py @@ -69,14 +69,14 @@ async def organic_scoring(self, metagraph, available_uids, messages): prompt = message_list[-1]['content'] uid_to_question[uid] = prompt message = message_list - syn = StreamPrompting(messages=message_list, model='gpt-4-turbo-preview', seed=self.seed, max_tokens=8096, temperature=self.temperature, provider=self.provider, top_p=self.top_p, top_k=self.top_k) + syn = StreamPrompting(messages=message_list, model='gpt-3.5-turbo-16k', seed=self.seed, max_tokens=8096, temperature=self.temperature, provider=self.provider, top_p=self.top_p, top_k=self.top_k) bt.logging.info(f"Sending {syn.model} {self.query_type} request to uid: {uid}, timeout {self.timeout}: {message[0]['content']}") task = self.query_miner(metagraph, uid, syn) query_tasks.append(task) self.wandb_data["prompts"][uid] = prompt query_responses = await asyncio.gather(*query_tasks) - await self.score_responses(query_responses, uid_to_question, metagraph) + scores, uid_scores_dict, wandb_data = await self.score_responses(query_responses, uid_to_question, metagraph) result = {} for (_, value), message_dict in zip(query_responses, messages): From 0833cfd08b723e32f55f5e51785cd351d16279ec Mon Sep 17 00:00:00 2001 From: Giga Chkhikvadze Date: Mon, 12 Feb 2024 14:38:39 +0400 Subject: [PATCH 08/24] fix: timeout of is live --- validators/weight_setter.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/validators/weight_setter.py b/validators/weight_setter.py index 33877b93..d135364d 100644 --- a/validators/weight_setter.py +++ b/validators/weight_setter.py @@ -115,7 +115,7 @@ async def get_available_uids(self): async def check_uid(self, axon, uid): """Asynchronously check if a UID is available.""" try: - response = await self.dendrite(axon, IsAlive(), deserialize=False, timeout=4) + response = await self.dendrite(axon, IsAlive(), deserialize=False, timeout=15) if response.is_success: bt.logging.trace(f"UID {uid} is active") return axon # Return the axon info instead of the UID From 936494a62e3de6230b0e55bf180322aa95a6bdd7 Mon Sep 17 00:00:00 2001 From: Giga Chkhikvadze Date: Mon, 12 Feb 2024 11:46:47 +0000 Subject: [PATCH 09/24] fix: scoring and update weight on api --- validators/text_validator.py | 4 ++-- validators/validator.py | 7 +++---- validators/weight_setter.py | 32 +++++++++++++++++++++++++++++++- 3 files changed, 36 insertions(+), 7 deletions(-) diff --git a/validators/text_validator.py b/validators/text_validator.py index d06610f8..1130e1f7 100644 --- a/validators/text_validator.py +++ b/validators/text_validator.py @@ -57,7 +57,7 @@ async def organic(self, metagraph, query: dict[str, list[dict[str, str]]]) -> As bt.logging.trace(resp) yield uid, resp - async def organic_scoring(self, metagraph, available_uids, messages): + async def organic_scoring(self, available_uids, metagraph, messages): query_tasks = [] uid_to_question = {} if len(messages) <= len(available_uids): @@ -83,7 +83,7 @@ async def organic_scoring(self, metagraph, available_uids, messages): (key, message_list), = message_dict.items() result[key] = value - return result + return result, scores, uid_scores_dict, wandb_data async def handle_response(self, uid: str, responses) -> tuple[str, str]: full_response = "" diff --git a/validators/validator.py b/validators/validator.py index 99472d7e..5c844de5 100644 --- a/validators/validator.py +++ b/validators/validator.py @@ -160,9 +160,8 @@ async def organic_scoring(request: web.Request): raise web.Response(status_code=401, detail="Invalid access key") body = await request.json() messages = body['messages'] - available_uids = await validator_app.weight_setter.get_available_uids() - - responses = await text_vali.organic_scoring(metagraph, available_uids, messages) + + responses = await validator_app.weight_setter.perform_api_scoring_and_update_weights(messages) return web.json_response(responses) except Exception as e: @@ -193,7 +192,7 @@ def main(run_aio_app=True, test=False) -> None: if run_aio_app: try: - web.run_app(validator_app, port=config.http_port, loop=loop) + web.run_app(validator_app, port=config.http_port, loop=loop, shutdown_timeout=120) except KeyboardInterrupt: bt.logging.info("Keyboard interrupt detected. Exiting validator.") finally: diff --git a/validators/weight_setter.py b/validators/weight_setter.py index d135364d..99971b82 100644 --- a/validators/weight_setter.py +++ b/validators/weight_setter.py @@ -49,7 +49,8 @@ def __init__(self, loop: asyncio.AbstractEventLoop, dendrite, subtensor, config, self.thread_executor = concurrent.futures.ThreadPoolExecutor(thread_name_prefix='asyncio') self.loop.create_task(self.consume_organic_scoring()) self.loop.create_task(self.perform_synthetic_scoring_and_update_weights()) - + self.steps_passed = 0 + async def run_sync_in_async(self, fn): return await self.loop.run_in_executor(self.thread_executor, fn) @@ -99,6 +100,35 @@ async def perform_synthetic_scoring_and_update_weights(self): await asyncio.sleep(10) + async def perform_api_scoring_and_update_weights(self, messages): + steps_passed = self.steps_passed + # self.metagraph = await self.run_sync_in_async(lambda: self.subtensor.metagraph(self.config.netuid)) + + available_uids = await self.get_available_uids() + selected_validator = self.text_vali + + uid_list = self.shuffled(list(available_uids.keys())) + bt.logging.info(f"starting {selected_validator.__class__.__name__} get_and_score for {uid_list}") + result, scores, uid_scores_dict, wandb_data = await selected_validator.organic_scoring(available_uids, self.metagraph, messages) + if self.config.wandb_on: + wandb.log(wandb_data) + bt.logging.success("wandb_log successful") + + self.total_scores += scores + + steps_since_last_update = steps_passed % iterations_per_set_weights + + if steps_since_last_update == iterations_per_set_weights - 1: + await self.update_weights(steps_passed) + else: + bt.logging.info( + f"Updating weights in {iterations_per_set_weights - steps_since_last_update - 1} iterations." + ) + self.steps_passed += 1 + return result + + + def select_validator(self, steps_passed): return self.text_vali if steps_passed % 5 in (0, 1, 2, 3) else self.image_vali From 0db72709064ad8bbf553b498ce12058fb527de81 Mon Sep 17 00:00:00 2001 From: Giga Chkhikvadze Date: Mon, 12 Feb 2024 12:33:33 +0000 Subject: [PATCH 10/24] fix: scoring and update weight on api --- validators/weight_setter.py | 33 ++++++++++++++++++++++++--------- 1 file changed, 24 insertions(+), 9 deletions(-) diff --git a/validators/weight_setter.py b/validators/weight_setter.py index 99971b82..158d90e0 100644 --- a/validators/weight_setter.py +++ b/validators/weight_setter.py @@ -11,7 +11,7 @@ import wandb import os import shutil - +import time from template.protocol import IsAlive from text_validator import TextValidator from image_validator import ImageValidator @@ -48,9 +48,27 @@ def __init__(self, loop: asyncio.AbstractEventLoop, dendrite, subtensor, config, self.thread_executor = concurrent.futures.ThreadPoolExecutor(thread_name_prefix='asyncio') self.loop.create_task(self.consume_organic_scoring()) - self.loop.create_task(self.perform_synthetic_scoring_and_update_weights()) + # self.loop.create_task(self.perform_synthetic_scoring_and_update_weights()) self.steps_passed = 0 + self.loop.create_task(self.update_available_uids_periodically()) + self.available_uids = {} + + async def update_available_uids_periodically(self): + while True: + self.metagraph = await self.run_sync_in_async(lambda: self.subtensor.metagraph(self.config.netuid)) + start_time = time.time() + self.available_uids = await self.get_available_uids() + uid_list = self.shuffled(list(self.available_uids.keys())) + bt.logging.info(f"Number of available UIDs for periodic update: {len(uid_list)}, UIDs: {uid_list}") + + end_time = time.time() + execution_time = end_time - start_time + bt.logging.info(f"Execution time for getting available UIDs amound is: {execution_time} seconds") + selected_validator = self.text_vali + + await asyncio.sleep(300) # 300 seconds = 5 minutes + async def run_sync_in_async(self, fn): return await self.loop.run_in_executor(self.thread_executor, fn) @@ -102,14 +120,11 @@ async def perform_synthetic_scoring_and_update_weights(self): async def perform_api_scoring_and_update_weights(self, messages): steps_passed = self.steps_passed - # self.metagraph = await self.run_sync_in_async(lambda: self.subtensor.metagraph(self.config.netuid)) - - available_uids = await self.get_available_uids() - selected_validator = self.text_vali - + available_uids = self.available_uids + uid_list = self.shuffled(list(available_uids.keys())) - bt.logging.info(f"starting {selected_validator.__class__.__name__} get_and_score for {uid_list}") - result, scores, uid_scores_dict, wandb_data = await selected_validator.organic_scoring(available_uids, self.metagraph, messages) + bt.logging.info(f"starting perform_api_scoring_and_update_weights for {uid_list}") + result, scores, uid_scores_dict, wandb_data = await self.text_vali.organic_scoring(available_uids, self.metagraph, messages) if self.config.wandb_on: wandb.log(wandb_data) bt.logging.success("wandb_log successful") From 291cf3f2f39834d6dee201d0bb76a2a718a919fd Mon Sep 17 00:00:00 2001 From: Giga Chkhikvadze Date: Mon, 12 Feb 2024 12:35:03 +0000 Subject: [PATCH 11/24] fix: unused line --- validators/weight_setter.py | 1 - 1 file changed, 1 deletion(-) diff --git a/validators/weight_setter.py b/validators/weight_setter.py index 158d90e0..eee8ba56 100644 --- a/validators/weight_setter.py +++ b/validators/weight_setter.py @@ -65,7 +65,6 @@ async def update_available_uids_periodically(self): end_time = time.time() execution_time = end_time - start_time bt.logging.info(f"Execution time for getting available UIDs amound is: {execution_time} seconds") - selected_validator = self.text_vali await asyncio.sleep(300) # 300 seconds = 5 minutes From bf89518538cd1ba91ca6fa81a7bbd3ab30690983 Mon Sep 17 00:00:00 2001 From: Giga Chkhikvadze Date: Mon, 12 Feb 2024 12:38:59 +0000 Subject: [PATCH 12/24] fix: update avalailbe uids 10 minutes --- validators/weight_setter.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/validators/weight_setter.py b/validators/weight_setter.py index eee8ba56..2a810bd2 100644 --- a/validators/weight_setter.py +++ b/validators/weight_setter.py @@ -47,11 +47,12 @@ def __init__(self, loop: asyncio.AbstractEventLoop, dendrite, subtensor, config, self.organic_scoring_tasks = set() self.thread_executor = concurrent.futures.ThreadPoolExecutor(thread_name_prefix='asyncio') - self.loop.create_task(self.consume_organic_scoring()) - # self.loop.create_task(self.perform_synthetic_scoring_and_update_weights()) + self.steps_passed = 0 self.loop.create_task(self.update_available_uids_periodically()) self.available_uids = {} + self.loop.create_task(self.consume_organic_scoring()) + # self.loop.create_task(self.perform_synthetic_scoring_and_update_weights()) async def update_available_uids_periodically(self): @@ -66,7 +67,7 @@ async def update_available_uids_periodically(self): execution_time = end_time - start_time bt.logging.info(f"Execution time for getting available UIDs amound is: {execution_time} seconds") - await asyncio.sleep(300) # 300 seconds = 5 minutes + await asyncio.sleep(600) # 600 seconds = 10 minutes async def run_sync_in_async(self, fn): return await self.loop.run_in_executor(self.thread_executor, fn) @@ -99,9 +100,9 @@ async def consume_organic_scoring(self): async def perform_synthetic_scoring_and_update_weights(self): while True: for steps_passed in itertools.count(): - self.metagraph = await self.run_sync_in_async(lambda: self.subtensor.metagraph(self.config.netuid)) + # self.metagraph = await self.run_sync_in_async(lambda: self.subtensor.metagraph(self.config.netuid)) - available_uids = await self.get_available_uids() + available_uids = self.available_uids selected_validator = self.select_validator(steps_passed) scores, _ = await self.process_modality(selected_validator, available_uids) self.total_scores += scores From 36f11a0947553c43a49909153a0328142d6bf945 Mon Sep 17 00:00:00 2001 From: Giga Chkhikvadze Date: Mon, 12 Feb 2024 14:02:15 +0000 Subject: [PATCH 13/24] fix: merge text and organic api --- validators/text_validator.py | 103 ++++++++++++++++++++++------------- validators/validator.py | 62 +++++++++++++-------- 2 files changed, 105 insertions(+), 60 deletions(-) diff --git a/validators/text_validator.py b/validators/text_validator.py index 1130e1f7..cec8d6c4 100644 --- a/validators/text_validator.py +++ b/validators/text_validator.py @@ -33,32 +33,31 @@ def __init__(self, dendrite, config, subtensor, wallet: bt.wallet): "timestamps": {}, } - async def organic(self, metagraph, query: dict[str, list[dict[str, str]]]) -> AsyncIterator[tuple[int, str]]: - for uid, messages in query.items(): - syn = StreamPrompting(messages=messages, model=self.model, seed=self.seed, max_tokens=self.max_tokens, temperature=self.temperature, provider=self.provider, top_p=self.top_p, top_k=self.top_k) - bt.logging.info( - f"Sending {syn.model} {self.query_type} request to uid: {uid}, " - f"timeout {self.timeout}: {syn.messages[0]['content']}" - ) - - self.wandb_data["prompts"][uid] = messages - responses = await self.dendrite( - metagraph.axons[uid], - syn, - deserialize=False, - timeout=self.timeout, - streaming=self.streaming, - ) - - async for resp in responses: - if not isinstance(resp, str): - continue - - bt.logging.trace(resp) - yield uid, resp - - async def organic_scoring(self, available_uids, metagraph, messages): - query_tasks = [] + # async def organic(self, metagraph, query: dict[str, list[dict[str, str]]]) -> AsyncIterator[tuple[int, str]]: + # for uid, messages in query.items(): + # syn = StreamPrompting(messages=messages, model=self.model, seed=self.seed, max_tokens=self.max_tokens, temperature=self.temperature, provider=self.provider, top_p=self.top_p, top_k=self.top_k) + # bt.logging.info( + # f"Sending {syn.model} {self.query_type} request to uid: {uid}, " + # f"timeout {self.timeout}: {syn.messages[0]['content']}" + # ) + + # self.wandb_data["prompts"][uid] = messages + # responses = await self.dendrite( + # metagraph.axons[uid], + # syn, + # deserialize=False, + # timeout=self.timeout, + # streaming=self.streaming, + # ) + + # async for resp in responses: + # if not isinstance(resp, str): + # continue + + # bt.logging.trace(resp) + # yield uid, resp + + async def organic(self, metagraph, available_uids, messages: dict[str, list[dict[str, str]]]) -> AsyncIterator[tuple[int, str]]: uid_to_question = {} if len(messages) <= len(available_uids): random_uids = random.sample(list(available_uids.keys()), len(messages)) @@ -71,19 +70,49 @@ async def organic_scoring(self, available_uids, metagraph, messages): message = message_list syn = StreamPrompting(messages=message_list, model='gpt-3.5-turbo-16k', seed=self.seed, max_tokens=8096, temperature=self.temperature, provider=self.provider, top_p=self.top_p, top_k=self.top_k) bt.logging.info(f"Sending {syn.model} {self.query_type} request to uid: {uid}, timeout {self.timeout}: {message[0]['content']}") - task = self.query_miner(metagraph, uid, syn) - query_tasks.append(task) - self.wandb_data["prompts"][uid] = prompt - - query_responses = await asyncio.gather(*query_tasks) - scores, uid_scores_dict, wandb_data = await self.score_responses(query_responses, uid_to_question, metagraph) + self.wandb_data["prompts"][uid] = messages + responses = await self.dendrite( + metagraph.axons[uid], + syn, + deserialize=False, + timeout=self.timeout, + streaming=self.streaming, + ) - result = {} - for (_, value), message_dict in zip(query_responses, messages): - (key, message_list), = message_dict.items() - result[key] = value + async for resp in responses: + if not isinstance(resp, str): + continue - return result, scores, uid_scores_dict, wandb_data + bt.logging.trace(resp) + yield uid, key, resp + + # async def organic_scoring(self, available_uids, metagraph, messages): + # query_tasks = [] + # uid_to_question = {} + # if len(messages) <= len(available_uids): + # random_uids = random.sample(list(available_uids.keys()), len(messages)) + # else: + # random_uids = [random.choice(list(available_uids.keys())) for _ in range(len(messages))] + # for message_dict, uid in zip(messages, random_uids): # Iterate over each dictionary in the list and random_uids + # (key, message_list), = message_dict.items() + # prompt = message_list[-1]['content'] + # uid_to_question[uid] = prompt + # message = message_list + # syn = StreamPrompting(messages=message_list, model='gpt-3.5-turbo-16k', seed=self.seed, max_tokens=8096, temperature=self.temperature, provider=self.provider, top_p=self.top_p, top_k=self.top_k) + # bt.logging.info(f"Sending {syn.model} {self.query_type} request to uid: {uid}, timeout {self.timeout}: {message[0]['content']}") + # task = self.query_miner(metagraph, uid, syn) + # query_tasks.append(task) + # self.wandb_data["prompts"][uid] = prompt + + # query_responses = await asyncio.gather(*query_tasks) + # scores, uid_scores_dict, wandb_data = await self.score_responses(query_responses, uid_to_question, metagraph) + + # result = {} + # for (_, value), message_dict in zip(query_responses, messages): + # (key, message_list), = message_dict.items() + # result[key] = value + + # return result, scores, uid_scores_dict, wandb_data async def handle_response(self, uid: str, responses) -> tuple[str, str]: full_response = "" diff --git a/validators/validator.py b/validators/validator.py index 5c844de5..dc1d8f2b 100644 --- a/validators/validator.py +++ b/validators/validator.py @@ -125,22 +125,38 @@ async def process_text_validator(request: web.Request): if access_key != EXPECTED_ACCESS_KEY: return web.Response(status=401, text="Invalid access key") - try: - messages_dict = {int(k): [{'role': 'user', 'content': v}] for k, v in (await request.json()).items()} - except ValueError: - return web.Response(status=400, text="Bad request format") + # try: + # messages_dict = {int(k): [{'role': 'user', 'content': v}] for k, v in (await request.json()).items()} + # except ValueError: + # return web.Response(status=400, text="Bad request format") + + body = await request.json() + messages = body['messages'] response = web.StreamResponse() await response.prepare(request) - uid_to_response = dict.fromkeys(messages_dict, "") + key_to_response = {} + uid_to_response = {} try: - async for uid, content in text_vali.organic(validator_app.weight_setter.metagraph, messages_dict): - uid_to_response[uid] += content - await response.write(content.encode()) + async for uid, key, content in text_vali.organic(metagraph=validator_app.weight_setter.metagraph, + available_uids=validator_app.weight_setter.available_uids, + messages=messages): + uid_to_response[uid] = uid_to_response.get(uid, '') + content + key_to_response[key] = key_to_response.get(key, '') + content + # await response.write(content.encode()) + prompts = {} + for uid, message_dict in zip(uid_to_response.keys(), messages): + (key, message_list), = message_dict.items() + prompt = message_list[-1]['content'] + prompts = {uid: prompt} + + validator_app.weight_setter.register_text_validator_organic_query( - uid_to_response, {k: v[0]['content'] for k, v in messages_dict.items()} + uid_to_response = [(uid, content) for uid, content in uid_to_response.items()], + messages_dict= prompts ) + return web.json_response(key_to_response) except Exception as e: bt.logging.error(f'Encountered in {process_text_validator.__name__}:\n{traceback.format_exc()}') await response.write(b'<>') @@ -152,25 +168,25 @@ def __init__(self, *a, **kw): super().__init__(*a, **kw) self.weight_setter: WeightSetter | None = None -async def organic_scoring(request: web.Request): - try: - # Check access key - access_key = request.headers.get("access-key") - if access_key != EXPECTED_ACCESS_KEY: - raise web.Response(status_code=401, detail="Invalid access key") - body = await request.json() - messages = body['messages'] +# async def organic_scoring(request: web.Request): +# try: +# # Check access key +# access_key = request.headers.get("access-key") +# if access_key != EXPECTED_ACCESS_KEY: +# raise web.Response(status_code=401, detail="Invalid access key") +# body = await request.json() +# messages = body['messages'] - responses = await validator_app.weight_setter.perform_api_scoring_and_update_weights(messages) +# responses = await validator_app.weight_setter.perform_api_scoring_and_update_weights(messages) - return web.json_response(responses) - except Exception as e: - bt.logging.error(f'Organic scoring error: ${e}') - await web.Response(status_code=400, detail="{e}") +# return web.json_response(responses) +# except Exception as e: +# bt.logging.error(f'Organic scoring error: ${e}') +# await web.Response(status_code=400, detail="{e}") validator_app = ValidatorApplication() validator_app.add_routes([web.post('/text-validator/', process_text_validator)]) -validator_app.add_routes([web.post('/scoring/', organic_scoring)]) +# validator_app.add_routes([web.post('/scoring/', organic_scoring)]) def main(run_aio_app=True, test=False) -> None: From c28b3fd7fbed8c86160d05ca25707b5f6144d880 Mon Sep 17 00:00:00 2001 From: Giga Chkhikvadze Date: Mon, 12 Feb 2024 14:29:00 +0000 Subject: [PATCH 14/24] fix: weight response --- validators/validator.py | 24 +++++++++++------------- validators/weight_setter.py | 26 -------------------------- 2 files changed, 11 insertions(+), 39 deletions(-) diff --git a/validators/validator.py b/validators/validator.py index dc1d8f2b..c8d7ecd4 100644 --- a/validators/validator.py +++ b/validators/validator.py @@ -25,7 +25,7 @@ import template from template import utils import sys - +import json from weight_setter import WeightSetter, TestWeightSetter text_vali = None @@ -124,11 +124,9 @@ async def process_text_validator(request: web.Request): access_key = request.headers.get("access-key") if access_key != EXPECTED_ACCESS_KEY: return web.Response(status=401, text="Invalid access key") - - # try: - # messages_dict = {int(k): [{'role': 'user', 'content': v}] for k, v in (await request.json()).items()} - # except ValueError: - # return web.Response(status=400, text="Bad request format") + + if len(validator_app.weight_setter.available_uids) == 0: + return web.Response(status=404, text="No available UIDs") body = await request.json() messages = body['messages'] @@ -147,22 +145,22 @@ async def process_text_validator(request: web.Request): # await response.write(content.encode()) prompts = {} for uid, message_dict in zip(uid_to_response.keys(), messages): - (key, message_list), = message_dict.items() + (key, message_list), = message_dict.items() prompt = message_list[-1]['content'] - prompts = {uid: prompt} + prompts[uid] = prompt # Update prompts correctly for each uid validator_app.weight_setter.register_text_validator_organic_query( - uid_to_response = [(uid, content) for uid, content in uid_to_response.items()], - messages_dict= prompts + uid_to_response=uid_to_response, + messages_dict=prompts ) - return web.json_response(key_to_response) + await response.write(json.dumps(key_to_response).encode()) except Exception as e: - bt.logging.error(f'Encountered in {process_text_validator.__name__}:\n{traceback.format_exc()}') + bt.logging.error(f'Encountered in {process_text_validator.__name__}:\n{traceback.format_exc()}, ERROR: {e}') await response.write(b'<>') - return response + class ValidatorApplication(web.Application): def __init__(self, *a, **kw): super().__init__(*a, **kw) diff --git a/validators/weight_setter.py b/validators/weight_setter.py index 2a810bd2..b23aa1a8 100644 --- a/validators/weight_setter.py +++ b/validators/weight_setter.py @@ -117,32 +117,6 @@ async def perform_synthetic_scoring_and_update_weights(self): ) await asyncio.sleep(10) - - async def perform_api_scoring_and_update_weights(self, messages): - steps_passed = self.steps_passed - available_uids = self.available_uids - - uid_list = self.shuffled(list(available_uids.keys())) - bt.logging.info(f"starting perform_api_scoring_and_update_weights for {uid_list}") - result, scores, uid_scores_dict, wandb_data = await self.text_vali.organic_scoring(available_uids, self.metagraph, messages) - if self.config.wandb_on: - wandb.log(wandb_data) - bt.logging.success("wandb_log successful") - - self.total_scores += scores - - steps_since_last_update = steps_passed % iterations_per_set_weights - - if steps_since_last_update == iterations_per_set_weights - 1: - await self.update_weights(steps_passed) - else: - bt.logging.info( - f"Updating weights in {iterations_per_set_weights - steps_since_last_update - 1} iterations." - ) - self.steps_passed += 1 - return result - - def select_validator(self, steps_passed): return self.text_vali if steps_passed % 5 in (0, 1, 2, 3) else self.image_vali From b56cbf6ac2ead36cf51b0b608ebdd03fafc386d2 Mon Sep 17 00:00:00 2001 From: Giga Chkhikvadze Date: Mon, 12 Feb 2024 15:02:12 +0000 Subject: [PATCH 15/24] fix: scoring for text validator --- validators/text_validator.py | 54 +----------------------------------- validators/validator.py | 29 ++++++------------- validators/weight_setter.py | 5 ++-- 3 files changed, 12 insertions(+), 76 deletions(-) diff --git a/validators/text_validator.py b/validators/text_validator.py index cec8d6c4..96ccc050 100644 --- a/validators/text_validator.py +++ b/validators/text_validator.py @@ -32,30 +32,6 @@ def __init__(self, dendrite, config, subtensor, wallet: bt.wallet): "scores": {}, "timestamps": {}, } - - # async def organic(self, metagraph, query: dict[str, list[dict[str, str]]]) -> AsyncIterator[tuple[int, str]]: - # for uid, messages in query.items(): - # syn = StreamPrompting(messages=messages, model=self.model, seed=self.seed, max_tokens=self.max_tokens, temperature=self.temperature, provider=self.provider, top_p=self.top_p, top_k=self.top_k) - # bt.logging.info( - # f"Sending {syn.model} {self.query_type} request to uid: {uid}, " - # f"timeout {self.timeout}: {syn.messages[0]['content']}" - # ) - - # self.wandb_data["prompts"][uid] = messages - # responses = await self.dendrite( - # metagraph.axons[uid], - # syn, - # deserialize=False, - # timeout=self.timeout, - # streaming=self.streaming, - # ) - - # async for resp in responses: - # if not isinstance(resp, str): - # continue - - # bt.logging.trace(resp) - # yield uid, resp async def organic(self, metagraph, available_uids, messages: dict[str, list[dict[str, str]]]) -> AsyncIterator[tuple[int, str]]: uid_to_question = {} @@ -68,7 +44,7 @@ async def organic(self, metagraph, available_uids, messages: dict[str, list[dict prompt = message_list[-1]['content'] uid_to_question[uid] = prompt message = message_list - syn = StreamPrompting(messages=message_list, model='gpt-3.5-turbo-16k', seed=self.seed, max_tokens=8096, temperature=self.temperature, provider=self.provider, top_p=self.top_p, top_k=self.top_k) + syn = StreamPrompting(messages=message_list, model=self.model, seed=self.seed, max_tokens=self.max_tokens, temperature=self.temperature, provider=self.provider, top_p=self.top_p, top_k=self.top_k) bt.logging.info(f"Sending {syn.model} {self.query_type} request to uid: {uid}, timeout {self.timeout}: {message[0]['content']}") self.wandb_data["prompts"][uid] = messages responses = await self.dendrite( @@ -85,34 +61,6 @@ async def organic(self, metagraph, available_uids, messages: dict[str, list[dict bt.logging.trace(resp) yield uid, key, resp - - # async def organic_scoring(self, available_uids, metagraph, messages): - # query_tasks = [] - # uid_to_question = {} - # if len(messages) <= len(available_uids): - # random_uids = random.sample(list(available_uids.keys()), len(messages)) - # else: - # random_uids = [random.choice(list(available_uids.keys())) for _ in range(len(messages))] - # for message_dict, uid in zip(messages, random_uids): # Iterate over each dictionary in the list and random_uids - # (key, message_list), = message_dict.items() - # prompt = message_list[-1]['content'] - # uid_to_question[uid] = prompt - # message = message_list - # syn = StreamPrompting(messages=message_list, model='gpt-3.5-turbo-16k', seed=self.seed, max_tokens=8096, temperature=self.temperature, provider=self.provider, top_p=self.top_p, top_k=self.top_k) - # bt.logging.info(f"Sending {syn.model} {self.query_type} request to uid: {uid}, timeout {self.timeout}: {message[0]['content']}") - # task = self.query_miner(metagraph, uid, syn) - # query_tasks.append(task) - # self.wandb_data["prompts"][uid] = prompt - - # query_responses = await asyncio.gather(*query_tasks) - # scores, uid_scores_dict, wandb_data = await self.score_responses(query_responses, uid_to_question, metagraph) - - # result = {} - # for (_, value), message_dict in zip(query_responses, messages): - # (key, message_list), = message_dict.items() - # result[key] = value - - # return result, scores, uid_scores_dict, wandb_data async def handle_response(self, uid: str, responses) -> tuple[str, str]: full_response = "" diff --git a/validators/validator.py b/validators/validator.py index c8d7ecd4..f64c4b92 100644 --- a/validators/validator.py +++ b/validators/validator.py @@ -107,9 +107,12 @@ def initialize_components(config: bt.config): def initialize_validators(vali_config, test=False): - global text_vali, image_vali, embed_vali + global text_vali, text_vali_organic, image_vali, embed_vali text_vali = (TextValidator if not test else TestTextValidator)(**vali_config) + text_vali_organic = (TextValidator if not test else TestTextValidator)(**vali_config) + text_vali_organic.model = 'gpt-3.5-turbo-16k' + text_vali_organic.max_tokens = 8096 image_vali = ImageValidator(**vali_config) embed_vali = EmbeddingsValidator(**vali_config) bt.logging.info("initialized_validators") @@ -137,7 +140,7 @@ async def process_text_validator(request: web.Request): key_to_response = {} uid_to_response = {} try: - async for uid, key, content in text_vali.organic(metagraph=validator_app.weight_setter.metagraph, + async for uid, key, content in text_vali_organic.organic(metagraph=validator_app.weight_setter.metagraph, available_uids=validator_app.weight_setter.available_uids, messages=messages): uid_to_response[uid] = uid_to_response.get(uid, '') + content @@ -151,10 +154,12 @@ async def process_text_validator(request: web.Request): validator_app.weight_setter.register_text_validator_organic_query( + text_vali=text_vali_organic, uid_to_response=uid_to_response, messages_dict=prompts ) - await response.write(json.dumps(key_to_response).encode()) + await response.write(json.dumps(key_to_response).encode()) + except Exception as e: bt.logging.error(f'Encountered in {process_text_validator.__name__}:\n{traceback.format_exc()}, ERROR: {e}') await response.write(b'<>') @@ -166,26 +171,8 @@ def __init__(self, *a, **kw): super().__init__(*a, **kw) self.weight_setter: WeightSetter | None = None -# async def organic_scoring(request: web.Request): -# try: -# # Check access key -# access_key = request.headers.get("access-key") -# if access_key != EXPECTED_ACCESS_KEY: -# raise web.Response(status_code=401, detail="Invalid access key") -# body = await request.json() -# messages = body['messages'] - -# responses = await validator_app.weight_setter.perform_api_scoring_and_update_weights(messages) - -# return web.json_response(responses) -# except Exception as e: -# bt.logging.error(f'Organic scoring error: ${e}') -# await web.Response(status_code=400, detail="{e}") - validator_app = ValidatorApplication() validator_app.add_routes([web.post('/text-validator/', process_text_validator)]) -# validator_app.add_routes([web.post('/scoring/', organic_scoring)]) - def main(run_aio_app=True, test=False) -> None: config = get_config() diff --git a/validators/weight_setter.py b/validators/weight_setter.py index b23aa1a8..220f7eab 100644 --- a/validators/weight_setter.py +++ b/validators/weight_setter.py @@ -18,7 +18,7 @@ from embeddings_validator import EmbeddingsValidator iterations_per_set_weights = 5 -scoring_organic_timeout = 60 +scoring_organic_timeout = 120 async def wait_for_coro_with_limit(coro, timeout: int) -> Tuple[bool, object]: @@ -202,12 +202,13 @@ async def set_weights(self, scores): def register_text_validator_organic_query( self, + text_vali, uid_to_response: dict[int, str], # [(uid, response)] messages_dict: dict[int, str], ): self.organic_scoring_tasks.add(asyncio.create_task( wait_for_coro_with_limit( - self.text_vali.score_responses( + text_vali.score_responses( query_responses=list(uid_to_response.items()), uid_to_question=messages_dict, metagraph=self.metagraph, From b80ef3704b3263dc4dd454d8d85deec924327541 Mon Sep 17 00:00:00 2001 From: Giga Chkhikvadze Date: Tue, 13 Feb 2024 06:27:31 +0000 Subject: [PATCH 16/24] fix: state json git ignore --- .gitignore | 2 +- state.json | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) delete mode 100644 state.json diff --git a/.gitignore b/.gitignore index 59d8ed2c..dbd8e6d9 100644 --- a/.gitignore +++ b/.gitignore @@ -8,4 +8,4 @@ state.json wandb/ .vscode .envrc -.idea/ \ No newline at end of file +.idea/ diff --git a/state.json b/state.json deleted file mode 100644 index 445e939f..00000000 --- a/state.json +++ /dev/null @@ -1 +0,0 @@ -{"text": {"themes": ["Philosopy", "Technology", "Physics", "Ethics", "Academic Writing", "Economy", "History", "Medicine", "Toxicity", "Roleplay", "Entertainment", "Biology", "Counterfactual", "Literature", "Chemistry", "Writing", "Sport", "Law", "Language", "Computer Science", "Multilangual", "Common Sense", "Art", "Complex Format", "Code Generation", "Math", "Code Debug", "Reasoning", "Global Cultures and Societies", "Modern and Ancient Civilizations", "Innovations in Science and Technology", "Environmental Conservation and Biodiversity", "World Religions and Philosophical Thought", "Global Economy and International Trade", "Public Health and Pandemic Response", "Human Rights and Social Justice Issues", "Political Systems and International Relations", "Major Historical Events and their Impact", "Advancements in Medicine and Healthcare", "Fundamentals of Physics and the Cosmos", "Cognitive Development and Learning Theories", "Sustainable Development and Green Technologies", "Media Literacy and News Analysis", "Classical and Modern Literature", "Fundamentals of Mathematics and Logic", "Social Psychology and Group Dynamics", "Emerging Trends in Education", "Civic Engagement and Community Organizing"], "questions": ["Define the term human rights and provide an example of a human rights violation.", "Explain the concept of social justice and discuss its importance in society.", "Research and discuss a current social justice issue happening in your country.", "Compare and contrast the Universal Declaration of Human Rights and the International Bill of Human Rights.", "Discuss the role of non-governmental organizations (NGOs) in advocating for human rights and social justice.", "Examine the impact of poverty on access to education and healthcare in developing countries.", "Research and discuss the challenges faced by refugees and asylum seekers in accessing their human rights.", "Explore the relationship between human rights and gender equality.", "Discuss the role of media in raising awareness about human rights violations and social justice issues.", "Analyze the impact of racial discrimination on marginalized communities and propose strategies for combating it.", "Discuss the impact of income inequality on access to education and healthcare.", "Explain the concept of systemic racism and provide examples of how it manifests in society.", "Analyze the role of media in shaping public perception of Human Rights and Social Justice Issues.", "Evaluate the effectiveness of international organizations in addressing Human Rights violations.", "Discuss the relationship between poverty and human trafficking, and propose potential solutions.", "Examine the impact of gender-based violence on the mental health of survivors.", "Analyze the effects of mass incarceration on marginalized communities.", "Discuss the challenges faced by refugees in accessing their basic human rights.", "Evaluate the role of corporations in promoting or inhibiting Social Justice Issues.", "Explain the concept of intersectionality and its significance in addressing multiple forms of discrimination.", "Explain the impact of globalization on labor rights in developing countries, considering both the positive and negative aspects.", "Discuss the ethical considerations of data privacy in the context of surveillance by government agencies.", "Analyze the role of social media as a platform for free speech versus its potential to infringe on individual privacy rights.", "Compare the effectiveness of international sanctions versus diplomatic negotiations in addressing human rights abuses by authoritarian regimes.", "Investigate the historical evolution of women's rights movements and their influence on contemporary gender equality legislation.", "Examine the challenges faced by indigenous populations in maintaining cultural heritage within the framework of national legal systems.", "Assess the legal and moral arguments surrounding the death penalty in the context of international human rights law.", "Debate the balance between intellectual property rights and access to essential medicines in low-income countries.", "Evaluate the role of the International Criminal Court in enforcing human rights standards and its impact on global justice.", "Explore the effects of climate change policies on the economic and social rights of populations in vulnerable regions.", "Explain the concept of intersectionality and how it relates to human rights and social justice issues.", "Discuss the historical context and significance of the Universal Declaration of Human Rights.", "Analyze the impact of systemic racism on marginalized communities and propose strategies for addressing it.", "Examine the role of NGOs (non-governmental organizations) in promoting and protecting human rights.", "Explore the connection between environmental justice and human rights, providing examples to support your analysis.", "Discuss the challenges faced by refugees and asylum seekers in accessing their human rights, and propose solutions.", "Explain the concept of restorative justice and its potential benefits in addressing social justice issues.", "Analyze the impact of socioeconomic inequality on the realization of human rights, and propose strategies for reducing it.", "Discuss the ethical considerations surrounding the use of artificial intelligence in decision-making processes related to social justice issues.", "Examine the relationship between gender equality and human rights, providing examples of key issues and progress made.", "Discuss the impact of systemic racism on access to education in marginalized communities.", "Analyze the role of social media in mobilizing social justice movements.", "Explain the concept of intersectionality and its significance in addressing multiple forms of discrimination.", "Evaluate the effectiveness of international human rights treaties in promoting social justice globally.", "Investigate the relationship between economic inequality and human rights violations.", "Discuss the challenges faced by LGBTQ+ individuals in accessing healthcare services.", "Examine the role of non-governmental organizations (NGOs) in advocating for human rights and social justice.", "Analyze the impact of colonialism on indigenous peoples rights and their ongoing struggles for justice.", "Discuss the ethical implications of capital punishment in relation to human rights.", "Explain the concept of restorative justice and its potential for addressing social injustice.", "Discuss the concept of intersectionality and its importance in understanding and addressing human rights and social justice issues.", "Analyze the impact of poverty on human rights and social justice, and propose strategies to alleviate poverty and promote equality.", "Examine the role of education in promoting human rights and social justice, and discuss the barriers and solutions to ensuring equal access to education.", "Discuss the historical and contemporary challenges faced by indigenous communities in relation to their human rights and social justice.", "Analyze the impact of gender inequality on human rights and social justice, and propose strategies to achieve gender equality.", "Examine the role of media in shaping public perception of human rights and social justice issues, and discuss the ethical responsibilities of media organizations.", "Discuss the relationship between environmental degradation and human rights, and propose strategies to address environmental justice issues.", "Analyze the impact of systemic racism on human rights and social justice, and discuss ways to dismantle racist structures and promote racial equality.", "Examine the challenges faced by LGBTQ+ individuals in relation to their human rights and social justice, and propose strategies to promote LGBTQ+ rights.", "Discuss the importance of international cooperation and collaboration in addressing global human rights and social justice issues.", "Discuss the impact of systemic racism on access to healthcare in marginalized communities.", "Examine the role of social media in promoting or hindering social justice movements.", "Analyze the ethical implications of capital punishment in relation to human rights.", "Evaluate the effectiveness of international human rights organizations in addressing global human rights violations.", "Explore the relationship between socioeconomic status and educational opportunities in disadvantaged communities.", "Discuss the challenges faced by LGBTQ+ individuals in accessing healthcare and social services.", "Analyze the impact of mass incarceration on marginalized communities and propose potential solutions.", "Examine the role of technology in advancing human rights advocacy and activism.", "Discuss the ethical considerations surrounding the use of drones in warfare and their impact on civilian populations.", "Explore the connection between climate change and social justice, particularly in vulnerable populations.", "Discuss the impact of systemic racism on access to education in marginalized communities.", "Analyze the role of social media in promoting awareness and activism for human rights issues.", "Examine the effectiveness of international organizations in addressing human rights violations.", "Compare and contrast the concepts of equality and equity in relation to social justice.", "Explore the ethical implications of using artificial intelligence in criminal justice systems.", "Discuss the challenges faced by individuals with disabilities in accessing healthcare services.", "Analyze the impact of mass incarceration on communities of color.", "Examine the role of economic inequality in perpetuating social injustice.", "Discuss the importance of gender equality in achieving social justice.", "Explore the relationship between climate change and human rights issues.", "Discuss the impact of racial profiling on the human rights and social justice of marginalized communities.", "Examine the role of social media in raising awareness about human rights violations and promoting social justice.", "Analyze the effectiveness of international organizations in addressing human rights abuses and promoting social justice globally.", "Evaluate the ethical implications of capital punishment in relation to human rights and social justice.", "Discuss the challenges faced by refugees and asylum seekers in accessing their human rights and achieving social justice.", "Examine the relationship between poverty and human rights violations, and propose strategies to address this issue.", "Analyze the impact of gender inequality on human rights and social justice, and propose measures for improvement.", "Discuss the role of education in promoting human rights and social justice, and explore barriers to access education globally.", "Examine the impact of environmental degradation on human rights and social justice, and propose sustainable solutions.", "Discuss the intersectionality of different social justice issues, such as race, gender, and socioeconomic status, and its impact on human rights.", "Discuss the impact of systemic racism on access to education in marginalized communities.", "Analyze the role of social media in promoting awareness about human rights violations.", "Explain the concept of intersectionality and its significance in addressing social justice issues.", "Explore the ethical implications of using AI and machine learning algorithms in criminal justice systems.", "Discuss the challenges faced by LGBTQ+ individuals in accessing healthcare services.", "Analyze the effectiveness of restorative justice practices in reducing recidivism rates.", "Explain the concept of cultural relativism and its implications for human rights advocacy.", "Discuss the role of economic inequality in perpetuating social injustice.", "Explore the impact of climate change on indigenous communities and their rights.", "Analyze the challenges faced by refugees in accessing legal protection and human rights.", "Explain the concept of intersectionality and how it relates to social justice issues.", "What are the key principles of the Universal Declaration of Human Rights?", "Describe the role of civil society organizations in promoting human rights and social justice.", "Discuss the impact of systemic racism on marginalized communities and propose strategies to address it.", "Examine the relationship between poverty and human rights, highlighting specific examples.", "Analyze the challenges faced by LGBTQ+ individuals in accessing their human rights and propose measures to overcome them.", "Explain the concept of restorative justice and its potential benefits in addressing social inequalities.", "Discuss the role of media in shaping public perception and awareness of human rights and social justice issues.", "Examine the impact of globalization on human rights and social justice, considering both positive and negative aspects.", "Discuss the ethical considerations surrounding the use of technology in surveillance and its implications for human rights and social justice.", "What are some basic human rights that everyone should have?", "How does poverty affect access to social justice?", "What are some examples of social justice issues in your community?", "Explain the concept of privilege and its impact on social justice.", "What are some ways to promote gender equality?", "Discuss the role of education in promoting human rights.", "How does systemic racism impact social justice?", "What are some challenges faced by refugees in accessing their human rights?", "Explain the concept of intersectionality and its relevance to social justice.", "Discuss the importance of freedom of expression in advocating for human rights.", "What are the main principles of the Universal Declaration of Human Rights?", "Explain the concept of social justice and its importance in promoting equality.", "Discuss the impact of poverty on the realization of human rights.", "Examine the role of education in addressing human rights and social justice issues.", "What are some key challenges in ensuring gender equality and women's rights?", "Analyze the connection between human rights and the criminal justice system.", "How can technology be used to advance human rights and social justice?", "Explore the relationship between freedom of expression and human rights.", "Discuss the role of NGOs in advocating for human rights and social justice.", "What are the ethical considerations surrounding humanitarian interventions?", "What are the key principles of human rights and social justice?", "Discuss the historical development of human rights and social justice movements.", "Explain the concept of intersectionality and its relevance to human rights and social justice.", "Analyze the impact of globalization on human rights and social justice.", "Discuss the role of international organizations in promoting and protecting human rights and social justice.", "Examine the challenges and barriers to achieving gender equality in society.", "Discuss the relationship between poverty and human rights.", "Analyze the role of education in promoting human rights and social justice.", "Explain the concept of systemic racism and its effects on marginalized communities.", "Discuss the importance of freedom of speech in the context of human rights and social justice.", "What are some examples of human rights violations in your country?", "How can social media be used as a tool to promote social justice?", "Explain the concept of intersectionality and its relevance to human rights.", "Discuss the impact of income inequality on social justice.", "What are the challenges faced by marginalized communities in accessing legal aid?", "How does systemic racism contribute to social injustice?", "Explain the concept of cultural relativism and its implications for human rights.", "Discuss the role of NGOs in advocating for human rights and social justice.", "What are the ethical considerations in the use of artificial intelligence in criminal justice systems?", "Explain the concept of restorative justice and its potential benefits for society.", "Discuss the impact of the Universal Declaration of Human Rights on global social justice movements.", "Explain the concept of intersectionality and its significance in addressing social justice issues.", "Analyze the role of social media in promoting awareness and activism for human rights.", "Evaluate the effectiveness of international human rights organizations in addressing social justice issues.", "Discuss the ethical implications of cultural relativism in relation to human rights violations.", "Explain the concept of restorative justice and its potential for addressing systemic social injustices.", "Analyze the connection between economic inequality and human rights violations.", "Discuss the challenges faced by indigenous communities in accessing and preserving their human rights.", "Evaluate the role of education in promoting social justice and human rights awareness.", "Explain the impact of mass incarceration on marginalized communities and its implications for social justice.", "Discuss the impact of social media on the promotion and protection of human rights.", "Examine the relationship between poverty and access to education in developing countries.", "Analyze the effectiveness of international organizations in addressing human rights violations.", "Explore the challenges faced by indigenous communities in their struggle for land rights.", "Discuss the role of gender inequality in perpetuating social injustice.", "Examine the ethical implications of capital punishment within the context of human rights.", "Analyze the impact of racial discrimination on marginalized communities.", "Discuss the importance of freedom of speech in promoting social justice.", "Explore the role of economic inequality in exacerbating social injustice.", "Analyze the impact of mass surveillance on individual privacy and human rights.", "Explain the concept of human rights and how it relates to social justice.", "Discuss the role of international organizations in promoting and protecting human rights.", "Analyze the impact of systemic racism on social justice and human rights.", "Examine the relationship between poverty and access to basic human rights.", "Evaluate the effectiveness of nonviolent protests in achieving social justice.", "Discuss the challenges faced by marginalized communities in accessing justice.", "Explain the concept of restorative justice and its potential benefits.", "Analyze the ethical implications of capital punishment in relation to human rights.", "Discuss the role of education in promoting human rights and social justice.", "Examine the impact of gender inequality on human rights and social justice.", "What are some key human rights issues that are currently being addressed globally?", "Discuss the concept of social justice and its importance in achieving equality.", "Explain the role of non-governmental organizations (NGOs) in advocating for human rights.", "Describe the impact of systemic racism on social justice and human rights.", "How do gender inequality and discrimination contribute to human rights violations?", "Discuss the challenges faced by indigenous communities in asserting their rights and achieving social justice.", "Explain the concept of economic inequality and its implications for human rights.", "Discuss the role of technology in both promoting and hindering human rights and social justice.", "Describe the relationship between climate change and human rights issues.", "What are some effective strategies for promoting human rights and social justice at the grassroots level?", "Explain the concept of intersectionality and its significance in understanding human rights and social justice issues.", "Discuss the impact of systemic racism on marginalized communities and propose ways to address it."], "theme_counter": 0, "question_counter": 0}, "images": {"themes": ["The Inner Journey", "The Dance of Life", "Enigmatic Reflections", "The Poetry of Silence", "Melodies of the Mind", "Whimsical Enigmas", "Whispers of Inspiration", "Colorful Abstractions", "Dancing Colors", "Transcendent moments", "The Essence of Light", "Metamorphosis", "Duality in Nature", "Transcending Time", "Essence of Life", "Ethereal Abstractions", "Hidden Depths", "Urban Rhythms", "Inner emotions", "Whispers of the Night", "Dreams that Soar", "Enchanted Melodies", "Embracing Solitude", "Dreamlike Reflections", "Abstracted Memories", "Melodies of the Mind", "Evolving Realities", "Serenade of Seasons", "Serenity in chaos", "Interwoven Narratives", "Cosmic Connections", "Interplay of elements", "Immersive Portals", "Whispers of the Wind", "Whispered Whimsies", "Painted Passions", "Celestial Strokes", "Imaginary Journeys", "Hidden Treasures", "Shimmering Illusions", "The Strength Within", "Evolving Patterns", "Exploring the Subconscious", "Harmony in Diversity", "Cosmic Dreams", "The Fragile Balance", "Mystical Wanderlust", "Ephemeral Moments", "Whispered Visions", "Metamorphosis of Form", "Capturing Times Essence", "Cascading Emotions", "Whispers of the heart", "Chasing Illusions", "The Fluidity of Form", "Emerging Horizons", "Unveiled Whispers", "Celestial Beings", "... (68 KB left)", "Journey of the Soul", "Transcendent Transparencies", "Tranquil Transcendence", "Luminous Visions", "Sensory Overload", "Exploring identity", "Vibrant Chaos", "The fragility of life", "Eternal Echoes", "Whispers of Wonder", "Whimsical Delights", "Strokes of Serenity", "Rhythm of Colors", "The Art of Silence", "Serenade of Shadows", "Imaginary Landscapes", "Dreams and reality", "Abstract Realities", "Untamed Imagination", "Embracing vulnerability", "Dreamlike Visions", "Melodies of Nature", "Hidden Symmetry", "Mystic Mosaic", "Symphony of Life", "The Art of Transformation", "Reimagining Classics", "Ephemeral beauty", "The Spirit of Movement", "Fragments of Time", "The Beauty of Decay", "The Magic of Childhood", "The Essence of Stillness", "Abstract Energy", "Whirling Vortex", "Parallel Universes Collide", "Whirling Dervish", "Enigmatic Beauty", "The Art of Balance", "Merging Dimensions", "Celestial Rhythms", "The Energy of Movement", "Vibrant Serenade", "Transcendent Fragments", "Magical Moments", "The Art of Transformation", "Rhythmic Movements", "Vibrant Cityscapes", "Captivating Textures", "Inner reflections", "Journey into Mystery", "Dreamy Watercolors", "Dancing with Time", "Fluid Dynamics", "Whispering Canvases", "Rhythms of the Earth", "Harmony in disarray", "Whispering Waters", "The Language of Color", "Merging Horizons", "The Human Connection", "Uncharted Horizons", "The Human Experience", "The Power of Music", "Wandering Thoughts", "Intertwined Destinies", "Cosmic vibrations", "The Art of Simplicity", "Eternal Serenity", "Textures of Time", "Emerging Identity", "Dreams in Motion", "Fluid Movements", "Ethereal Enigmas", "Dreams of Serenity", "Evolving Textures", "Melodies of the Sea", "The Joy of Simplicity", "Melodies of the Universe", "The Symphony of Life", "Cosmic Kaleidoscope", "Symphony of Solitude", "The art of connection", "The Magic of Texture", "Inner Reflections", "Ethereal Dreams", "Whispers of the Universe", "Infinite Possibilities", "Shifting Perspectives", "Harvesting Memories", "Embracing the Elements", "Surreal Soundscapes", "Evolving Dimensions", "The Language of Dreams", "Soulful Expressions", "Embracing the Unknown", "Breaking Barriers", "Strokes of Brilliance", "Capturing Fragments", "Visions of tomorrow", "Rhythms of the Mind", "Vivid Dreamscape", "Enchanted Forest", "Essence of Silence", "The Magic Within", "Enigmatic Depths", "Urban Poetry", "Unveiled Secrets", "Captivating Curves", "Transcending Dimensions", "Exploring duality", "Translucent Dreams", "Soothing Serenity", "Uncharted Territories Explored", "Timeless elegance", "Eternal Serenade", "Timeless Elegance", "Dancing Brushstrokes", "Curious Connections", "Transcending Dimensions", "Ethereal Beauty", "Mystical Realms", "Emerging from Shadows", "Cosmic Tapestry", "Enigmatic Melodies", "The Dance of Lines", "The Dance of Colors", "Mystical creatures", "Celestial Visions", "The Essence of Life", "Rhythms of the Imagination", "Serenity in Chaos", "Imaginary Horizons", "Cascading Colors", "Mystical Whispers", "Architectural Marvels", "Whispering Whimsy", "Journey of Light", "Melting Colors", "Mystical Enchantments", "The Language of Silence", "Immersive Visions", "Celestial Fragments", "Whirling Motion", "Visions of Tomorrow", "Ethereal beauty", "Layers of Meaning", "Harmony in Form", "Natures Tapestry", "Harvesting Shadows", "Vibrant Contrasts", "Organic Metamorphosis", "The Unseen World", "The Language of Colors", "Unseen Realms", "Reflections of Life", "Timeless Beauty", "Whispers of Time", "Redefining Reality", "Vibrant Surrender", "Harmony in Diversity", "Whispers of Nature", "Silent Echoes", "Visions of Light", "Spectral Visions", "Celestial Beauty", "Transcendent Bliss", "Whimsical Curiosity", "The Fragments of Memory", "Hidden Truths", "Luminous Depths", "Melting Pot", "Surreal Wonderland", "Celestial Harmonies", "Whispered Whimsy", "Melodies of Creation", "Illusions of Reality", "Inner Emotions", "Cityscape Vibes", "Dreamlike Realities", "Urban Jungle", "The Harmony of Opposites", "Journey to Serenity", "Layers of Perception", "Colorful Kaleidoscope", "Evolving identities", "Whispering Secrets", "Whimsical Portraits", "Shadows of the Mind", "Whimsical dreams", "Exploring Identity", "Spectrum of Emotions", "Captivating Curiosity", "Reflections of Identity", "Fragments of Memories", "Cosmic Serenity", "Mystic Mirage", "Whirling Dreams", "Infinite possibilities", "Transcendent Moments", "Enchanted Abstractions", "Blissful Serenity", "Vibrant Echoes", "Exploring the Void", "Sculpting the Soul", "Whispers of the Sea", "Surreal Landscapes", "Vibrant Emotions", "Eternal Euphoria", "The Essence of Silence", "Whispered Secrets Revealed", "Stardust Symphony", "The Dance of Fire", "Flowing Movements", "Stardust Melodies", "Whispered Secrets", "Captivating Fragments", "Mysteries of Time", "The Canvas of Dreams", "Whispers of Infinity", "Abstract impressions", "Cascading Light", "Cosmic Journey", "Celestial Bodies", "Transcending Boundaries", "Shaping the Unknown", "Ripples of Imagination", "Colors of the Soul", "Luminous Transitions", "The Art of Reflection", "Parallel Dimensions", "The Magic of Movement", "The Beauty of Stillness", "Serenade of Light", "Infinite Intricacies", "Illusive Realms", "Enchanted Reverie", "Dancing with Colors", "Whispers of Imagination", "Translucent Transitions", "Ethereal Visions", "Capturing Serendipity", "Rhythm of Creation", "Mosaic of Dreams", "Dreams in Technicolor", "Emotions Unleashed", "The Symphony of Colors", "Beyond the Surface", "Unseen dimensions", "Harvest of Dreams", "The Human Condition", "Melancholic Whimsy", "Surreal Portraits", "Journey to the Soul", "The Energy of Life", "Layers of Existence", "Mystical Enchantment", "Auroras Embrace", "The Mystery of Shadows", "Essence of Serenity", "Emerging Realities", "Fleeting Impressions", "Luminous Enigmas", "Fluid Expressions", "Euphoria in Motion", "Embracing Vulnerability", "Journey into darkness", "The beauty of decay", "The Dance of Time", "Tangled Thoughts", "The beauty of simplicity", "Redefining Perspectives", "Ethereal Whispers", "The Colors of Sound", "Melodies of life", "Emerging Energy", "Symphony of Shadows", "Metamorphic Dreams", "Reverie of Light", "Dreamy Landscapes", "Echoes of the Past", "Shimmering Horizons", "Journey into Light", "Natures Kaleidoscope", "Echoes of the Mind", "The Art of Shadows", "Vibrant Rhythms", "Colorful Fragments", "The Art of Stillness", "Celestial Melodies", "Colors of the Mind", "Magical Realms", "Whispers of Dreams", "Mystical Journeys", "Colorful Whirlwinds", "Transcending Reality", "The Art of Connection", "Symphony of Textures", "Unseen Perspectives", "Whispers of the Soul", "Translucent Veil", "Whispering Dreams", "Waves of Creativity", "Exploring the Unknown", "Ethereal Elegance", "Whimsical Tales", "Metamorphosis of Colors", "Colorful Whispers", "Luminous Reverie", "Ephemeral Fragments", "Mosaic of Memories", "Whirling Fantasies", "The Essence Within", "Vibrant Perspectives", "Eternal Fragility", "Whimsical Wanderlust", "Reimagined Landscapes", "The Fluidity of Nature", "Sculpted Whispers", "Colorful abstractions", "Dreams of Tomorrow", "Unexpected Connections", "Sensory Delights", "Harmony in chaos", "Dynamic Perspectives", "Juxtaposed Elements", "Surreal Dreamscape", "Whimsical Escapes", "Celestial Canvas", "The Poetry of Light", "Ripples of Time", "Whispers of the Sky", "Whispering Echoes", "Merging Perspectives", "Metamorphosis of Life", "Infinite Imagination", "Harmonic Fusion", "The Depths of Emotion", "The Art of Motion", "Untamed Wildness", "Inner Worlds", "The human experience", "Echoes of Stillness", "Rhythms of the Sea", "Rhythm of the Elements", "Metamorphosis of Color", "Temporal Illusions", "The Symphony of Textures", "Sculpting Time", "Mystical Forests", "Whispering Waves", "Celestial Symphony", "Enigmatic Shadows", "Embracing the Unknown", "Whispers of the Mind", "The magic of details", "Embracing Diversity", "The Language of Lines", "Rhythms of nature", "Abstract Color Explosions", "Shadows and light", "Eternal Echoes", "Shades of Serenity", "Fragments of Eternity", "Whirlwind of Emotions", "Symphony of Light", "Enigmatic Horizons", "Unlocking Imagination", "Redefining Boundaries", "Evolving Energies", "Unleashing Creativity", "Chasing Shadows", "Harvest of Memories", "Abstracted Nature", "Abstract Reflections", "Eternal Moments", "Emotional connections", "Unveiled Realities", "Rhythmic Abstractions", "Visions of Tomorrow", "Chromatic Symphony", "Parallel Realities", "Mystic Melodies", "The Symphony of Emotions", "Infinite Horizons", "The Art of Serendipity", "Whispers of the Earth", "The Chaos of Creation", "Echoes of Eternity", "Embracing Imperfection", "Harmony in Chaos", "Celestial Dreams", "Canvas of Dreams", "Urban Exploration", "Embracing the Abstract", "Unfolding Stories", "Interstellar Symphony", "Fluid Abstractions", "The Power of Perspective", "Whispered Memories", "Transcending Boundaries", "Whispers of Creation", "Illusionary Landscapes", "Enchanted Gardens", "The Fragility of Time", "Enigmatic Fragments", "Enchanted Forests", "Sculpted Illusions", "Dreams of Flight", "Unveiled Illusions", "Evolving Perspectives", "Celestial Harmony", "Metamorphosis of life", "Mystical Portals", "Glimpses of Life", "Serenading Raindrops", "Serenading Colors", "Dreamscapes", "Evolving Fragments", "Cosmic Reverie", "The Beauty of Movement", "Captivating Contrasts", "Imaginary landscapes", "Spectrum of Serenity", "Captivating Chaos", "Shaping the Unseen", "Whirling Colors", "Ethereal Enigma", "Whispers of Serenity", "Infinite Perspectives", "Enigmatic Euphoria", "Embracing imperfections", "Essence of Time", "Celestial Awakening", "Rustic Simplicity", "A Glimpse of Eternity", "Infinite Textures", "Translucent Depths", "Vibrant Dreamscape", "Unveiled Connections", "The Serenity of Space", "Abstract Emotions", "Transcendent Whispers", "Serendipitous Encounters", "Soulful Strokes", "Chasing Sunsets", "Timeless Moments", "Cosmic Energy", "Surreal Serenity", "Whispers of the Past", "Whimsical Adventures", "The Power Within", "Celestial Rapture", "The art of solitude", "Illusions of Light", "Harmonious Fusion", "Reflections of Self", "Eternal Enigma", "Inner Landscapes", "Captivating Silence", "Abstract Serenity", "Infinite Curiosity", "Ethereal Essence", "Enigmatic Illusions", "Unveiling Secrets", "Harmonious Contrasts", "Whispers of Light", "The Alchemy of Creation", "Emerging Whispers", "Abstract Color Explosion", "Unveiled Perspectives", "Enchanted Echoes", "Rhythms of the Heart", "The Spirit of Freedom", "Symphony of colors", "Whirling Emotions", "Whimsical Wonder", "Infinite Dimensions", "Eternal Whispers", "Celestial Serenade", "Journey to Infinity", "Uncharted Territories", "Whimsical Wonders", "Whispers of Memories", "Whimsical Wonderland", "Dreamlike Wanderlust", "Colorful Illusions", "Harmony in contrast", "Surreal Symphony", "Beyond the Surface", "Eternal transformations", "Cosmic Wonders", "Ephemeral Beauty", "Whispers of the Sea", "The Souls Journey", "Melancholic Serenity", "Illusive Realities", "Surreal Serenity", "Celestial Fireworks", "Hidden Realities", "Parallel universes", "A World Apart", "Unveiled Emotions", "Dreams of flight", "Capturing Fragility", "Whimsical Wonders", "Rhythms of Nature", "Infinite Connections", "Interstellar Dreams", "Innermost Thoughts", "Emotional Journeys", "Organic Symmetry", "Whispering Colors", "Embracing Vulnerability", "Enigmatic Serenity", "Vibrant Whispers", "Wandering Imagination", "The Magic of Water", "Capturing emotions", "Vibrant Serendipity", "The Essence of Movement", "The Play of Contrasts", "Mystical Creatures", "Soothing Chaos", "Whispers of the soul", "Enchanted Forest Tales", "Melodies of Color", "The Fragility of Life", "The Power of Color", "Whispering Whirlwinds", "The Symphony of Shapes", "Surreal Visions", "The Spirit Within", "Exploring the unknown", "Symmetry in Chaos", "Evolving Dreams", "Cosmic connections", "Translucent Veils", "Dancing Shadows", "Threads of Destiny", "Majestic Whispers", "Suspended Realities", "Dreams and Fantasies", "Surreal Landscapes", "Metamorphosis of Light", "Enchanted Landscapes", "Unveiling Truths", "Emotional Portraits", "Journey of Discovery", "Celestial Explorations", "Shades of Solitude", "Symmetry in Asymmetry", "Uncharted Depths", "Dancing with light", "Wandering Souls", "Surreal Harmonies", "Shadows and Light", "Surreal Serenade", "Surreal Reverie", "Evolving Identities", "Forgotten Memories", "The Power of Silence", "Chaos and Order", "Fragmented Realities", "Evolving Harmonies", "Dreamlike Dalliance", "Rhythms of Life", "Enigmatic Landscapes", "The Spirit of Adventure", "Emotional landscapes", "Magical Realism", "Mystical Serenity", "The Melody of Love", "Whispered Stories", "Sculpting Emotions", "The Fragility of Love", "Whispered Revelations", "The Poetry of Motion", "Rhythm of Life", "Untamed Wilderness", "Cityscapes at Dusk", "Rhythmic Landscapes", "Celestial Fragments", "Symphony of Dreams", "The Dance of Textures", "The Whispers of Wind", "Fleeting Fragments", "Whispering Whirlpools", "Mystical Movements", "The Inner Voice", "The Power of Now", "Whispering winds", "Eternal Inspiration", "Sculpting Shadows", "The Essence of Time", "Hidden Emotions", "The Language of Music", "Merging Realities", "Dreamlike Diversions", "Sculpted Memories", "Ephemeral Essence", "Unveiling Shadows", "Abstract Narratives", "The Magic of Motion", "Ethereal Landscapes", "Whispering Shadows", "The Symphony of Chaos", "Soothing Solitude", "The Intersection of Dreams", "Harmony of Elements", "Merging Horizons", "Dancing with Shadows", "Whispers of the past", "The Poetry of Nature", "Rhythms of Imagination", "Ethereal landscapes", "Whispers of Silence", "Celestial Brushstrokes", "Mystical Rhythms", "The Power of Stillness", "The Dance of Contrast", "Visions of Hope", "Whispers of the Heart", "Transcendent Transitions", "Rhythm of the Sea", "Harmonic Convergence", "The Art of Imperfection", "Unveiling Mystery", "Serenity in Motion", "Harmony Unveiled", "Embracing the Chaos", "Abstract Expressions", "Serenade of Colors", "Surreal Reflections", "Dancing with Color", "Whispering Tides", "Serenity in Chaos", "Symphony of Colors", "Harvesting Dreams", "Imaginary Creatures", "Suspended Animation", "Imagined Landscapes", "Spectral Reflections", "Mystical Reflections", "Melodies in Motion", "Harmony in Nature", "Abstract Whispers", "Urban Jungle Dreams", "Dancing with Light", "Whimsy and Wonder", "Reflections of Light", "Unraveling Mysteries", "Euphoric Elegance", "Shaping Time", "Exploring Contrasts", "Tangled Emotions", "Fleeting Moments Frozen", "The Magic of Details", "Whispered secrets", "Essence of life", "Unveiling the Unknown", "Layers of Identity", "Echoes of silence", "Spectral Whispers", "The Tapestry of Life", "Enchanted Realms", "Celestial Fusion", "Journey Through Time", "Soulful Melodies", "Emerging Dimensions", "The Poetry of Color", "Whimsical Wanderlust", "The Kaleidoscope of Thoughts", "Surreal Realities", "Symphony of Life", "Emotional Landscapes", "Whirling Energies", "Unseen perspectives", "Shades of Wonder", "Journey to the Unknown", "Unveiling Beauty", "The Alchemy of Creation", "Melodies of nature", "Whispers of Memory", "Fragments of Life", "Human Connections", "Echoes of Time", "Melodies of Light", "Surreal visions", "Luminous Shadows", "Shades of Serendipity", "Rhythmic Patterns", "Captured Moments", "Whimsical Creatures", "Embracing Imperfections", "Echoes of the Soul", "Hidden Dimensions", "The rhythm of nature", "Rhythms of the Soul", "Perpetual Motion", "Exploring Inner Landscapes", "Magical realism", "The Essence of Love", "Eternal Flames", "The Power of Emotion", "Cosmic Wonder", "Emerging Patterns", "Lyrical Brushstrokes", "Unveiling the Invisible", "Surreal Symmetry", "Mystical Melodies", "Melodic Vibrations", "Infinite Love", "Vibrant Fusion", "Captured Essence", "Sculpting Dreams", "Cosmic Dreamscape", "Shades of Emotion", "Unseen Dimensions", "Surreal Wonder", "Mystical Mosaics", "The Rhythm of Life", "Invisible Connections", "Cultural Fusion", "Evolving Identity", "Immersed in Texture", "The power of words", "Abstracting Reality", "Reflections of Time", "Liberating Limitations", "Cosmic Rhythms", "Exploring Duality", "Surreal Whispers", "Reimagined Realities", "Euphoric Euphony", "Shattered Illusions", "Unspoken Emotions", "Ethereal Explorations", "Vibrant Reverie", "The essence of time", "The Beauty of Solitude", "Harmony in Motion", "Metamorphosis of Self", "Abstract landscapes", "Mystic Mosaics", "The Harmony of Shapes", "The Fragments of Time", "Eternal Connections", "The Language of Symbols", "The Power of Light", "Journey Within", "Dreamlike Journeys", "Ephemeral Essence", "Unveiling the Unseen", "Vibrant Abstractions", "Hidden Messages", "Enigmatic portraits", "Rhythm of the Universe", "Capturing Timelessness", "Unlocking Creativity", "Eternal Metamorphosis", "The Souls Canvas", "Spectrum of Dreams", "Urban Melodies", "Dancing Fireflies", "Vibrant Energy", "Vibrant Reflections", "Serenade of Silence", "The Beauty of Imperfection", "Serenade of Serenity", "Imaginary Portraits", "Urban reflections", "Dreams and Nightmares", "Melting Pot of Cultures", "Celestial Serenity", "The Complexity of Silence", "Enigmatic Visions", "The Souls Reflection", "Starry Nightscapes", "Whispering Landscapes", "Whirling Energy", "The Magic of Lines", "Fragments of Memory", "Mystical Waters", "The souls journey\"", "Shattered Realities", "Mystic Reverie", "Whimsical Wonderlands", "Spectral Illusions", "Theatrical Illusions", "Celestial wonders", "Emerald Dreamscape", "Into the Abyss", "Surreal Wonderlands", "Whispered Echoes", "Ephemeral Echoes", "Imaginary Worlds", "Cosmic Exploration", "Chasing Rainbows", "Eternal Reflections", "Unveiling Illusions", "The Dance of Elements", "The Fragments of Dreams", "Enchanting Abstractions", "Cosmic Harmony", "The Mystery Within", "Harmonious Fusion", "Enchanted Horizons", "Melting Boundaries", "The power of silence", "Harmony in Disarray", "Dancing with shadows", "Melting Horizons", "Journey into Silence", "Parallel Universes Unveiled", "Rhythm of the Rain", "Whirling Dervishes", "Celestial Whispers", "Vibrant Whirlwind", "Capturing Essence", "Fusion of Elements", "The Power of Imagination", "Surreal Symphony", "Fragments of memories", "Enigmatic Elegance", "Reflections of the Soul", "Journey to the Stars", "Captured Fragments", "Ethereal Euphoria", "Luminous Whispers", "Dancing with Fire", "Exploring Boundaries", "Melodies of the Soul", "Visions of Tranquility", "Uncharted territories", "Unseen Realities", "Embracing Imperfections", "The Whirlwind of Inspiration", "Mystic Visions", "Textures of existence", "Abstract Realities", "Fleeting Eternity", "Sculpted Soundwaves", "Vibrant energy", "Vibrant Serenity", "Evolving Emotions", "Redefining Beauty", "Chromatic Whispers", "Evolving Whispers", "Hidden Beauty", "Transcendent Whispers", "Abstract Alchemy", "The Power of Words", "The Symphony of Senses", "The Essence of Dreams", "Vibrant Reverberations", "Serenading Shadows", "Emotional Resonance", "Transcendent Silence", "Uncharted Realms", "Journey into Abstraction", "Echoes of Nature", "The Unseen Universe", "Sculpted Dreams", "Melodies of the Heart", "Colorful chaos", "Whispering Horizons", "Mosaic of Life", "Melting Time", "Ephemeral Eternity", "Serenade of Textures", "Timeless moments", "Unseen Connections", "Sculpting Memories", "Temporal Fragments", "Harmonious Chaos", "Abstract Euphoria", "Whimsical Abstractions", "Ethereal Watercolors", "Harmony of Colors", "Rhythm of the Soul", "Unspoken Stories", "Curious Contradictions", "Luminous Reflections", "Infinite Echoes", "Exploring Fragility", "The Intersection of Cultures", "Serenading Sunsets", "Ethereal Serenity", "Eternal Fragments", "The Art of Connection", "Embracing Shadows", "Celestial Landscapes", "The Power of Contrast", "Abstract Reverie", "Tales Untold", "Symphony of Shapes", "Chromatic Kaleidoscope", "Ethereal Enchantment", "The Transcendent Journey", "Melancholic Melodies", "Infinite Horizons", "Alchemy of Expression", "Unveiling mysteries", "Organic Abstractions", "Colorful Chaos", "Unraveling Time", "Infinite Depths", "Whirlwind of Thoughts", "Inner Strength", "Vibrant Visions", "Echoes of Emotion", "Rhythms of the city", "Evolving Horizons", "Metamorphosis of nature", "Whimsical Dreams", "Rhythmic Rapture", "Emerging Realities", "Harmony of Contrasts", "Luminous Journeys", "The dance of colors", "Celestial Wonders", "Hidden Worlds Revealed", "Whirlwind of Colors", "Celestial Reflections", "Luminous Illusions", "Temporal Echoes", "Urban Tapestry", "Sensory Explorations", "Harvesting Hope", "Harmony in Contrast", "Eternal Motion", "Whimsical Journey", "Enigmatic Portraits", "Ethereal Reflections", "Urban Illusions", "Abstracted Emotions", "Urban rhythms", "Unspoken narratives", "Journey of Colors", "Spectral Melodies", "Celestial Rhapsody", "Vibrant Brushstrokes", "Journey of the Soul", "Sonic Landscapes", "Celestial Mosaics", "Translucent Dreams", "Textures of Life", "Exploring Dimensions", "Dreamlike Landscapes", "Spiraling Visions", "Ancient Mysteries", "Mysterious Abandon", "Shimmering Dreamscape", "Captivating Illusions", "Transcendent Echoes", "Hidden Meanings", "Metamorphosis of Time", "Reimagining Reality", "The Language of Shapes", "Hidden Beauty Revealed", "Enchanted Visions", "Uncharted Territories", "Journey of self", "The Beauty Within", "Shaping Memories", "Cosmic Whispers", "Embracing Chaos", "Fleeting Moments", "The Ebb and Flow", "Underwater Fantasies", "Parallel Universes", "The Language of Dreams", "The Dance of Light", "The Melody of Light", "The Dance of Nature", "Transcendent Reflections", "Whispers of Inspiration", "Ethereal Landscapes", "Ephemeral Whispers", "Shadows of Tomorrow", "Infinite Horizon", "Dreams Unleashed", "The Dance of Shadows", "Abstracted Realities", "Rhythmic Reverie", "Abstracted Movements", "Spiraling Energy", "Enchanted Whispers", "Abstract Harmony", "Whispering Winds", "Ethereal Dreamscape", "Imaginary Realms", "Uncharted Waters", "Embracing the wild", "Transcendent Beauty", "Curiosity Unleashed", "Synchronized Chaos", "Whispering Whispers", "Serenading Silence", "Captivating Rhythms", "Abstract Illusions", "Shaping Perspectives", "Mystic Reflections", "Surreal fantasies", "Surreal Visions Unveiled", "Abstract Landscapes", "The Essence of Freedom", "Whimsical Whispers", "Colors in Motion", "The language of dreams", "Surreal Symphonies", "Ethereal Echoes", "Infinite Reflections", "The Poetry of Light", "Luminous Landscapes", "Whimsical wonders", "Sculpted Emotions", "Echoes of Silence", "Cosmic Serenade", "Evolving Perspectives", "Unseen Emotions", "Melancholic Whispers", "Urban Melancholy", "Whispered Whispers", "Eternal Transcendence", "Journey to Nowhere", "Infinite Fragments", "Ethereal Essence", "Melodies of Life", "Mystical Mosaic", "Euphorias Embrace", "The Wonder of Discovery", "Vivid Imagination", "Shadows of the Mind", "Unveiling Emotions", "Journey of Shadows", "Journey of Self-Discovery", "Exploring Connections", "Cosmic Vibrations", "The Language of Flowers", "Mystical Landscapes"], "questions": ["1. A group of children running through a field, chasing after a rainbow that seems to be leading them to a hidden treasure.", "2. A colorful hot air balloon floating in the sky, with a rainbow trailing behind it as it soars through the clouds.", "3. A brave adventurer climbing up a steep mountain, determined to reach the end of a rainbow that seems to touch the peak.", "4. A young artist painting a vibrant rainbow on a canvas, each stroke capturing the beauty and magic of the colors.", "5. A flock of colorful birds flying in formation, their feathers shining like a rainbow as they migrate across the sky.", "6. A garden filled with blooming flowers of every color, with a gentle rain shower creating a shimmering rainbow above them.", "7. A group of friends on a road trip, driving down a winding road as a rainbow stretches across the horizon before them.", "8. A street artist creating a stunning 3D chalk drawing of a rainbow on a busy city sidewalk, captivating passersby.", "9. A child blowing bubbles filled with rainbow colors, watching as they float and shimmer in the sunlight.", "10. A scientist observing a prism splitting white light into a spectrum of colors, unlocking the secrets of rainbows.", "11. A rainbow-colored waterfall cascading down a rocky cliff, creating a mesmerizing display of colors and mist.", "12. A magical forest where the trees are adorned with rainbow-colored leaves, illuminating the entire area with vibrant hues.", "13. A musician playing a vibrant rainbow-colored piano, each key producing a different color and sound.", "14. A rainbow-colored carousel spinning in a park, as children ride on beautifully decorated mythical creatures.", "15. A photographer capturing a stunning double rainbow over a serene lake, reflecting the colors in the water.", "16. A vibrant parade marching through the streets, with participants dressed in colorful costumes and rainbow floats.", "17. A diver exploring a coral reef, amazed by the vibrant colors of the underwater world, resembling a rainbow.", "18. A pot of gold at the end of a rainbow, hidden deep within an ancient cave, waiting to be discovered by an adventurous soul.", "19. A rainbow-colored bridge connecting two distant lands, symbolizing unity and hope.", "20. An artist creating a mesmerizing sand art masterpiece, using rainbow-colored sand to depict a breathtaking landscape.", "A young girl with a paintbrush chases a vibrant rainbow that dances across the sky, leaving trails of colorful paint in her wake.", "A group of friends embark on a hot air balloon adventure, chasing a rainbow as it stretches across a picturesque landscape of rolling hills and sparkling lakes.", "In a futuristic city, a robot with a rainbow-colored trail zooms through the streets, leaving a trail of neon lights and glowing colors in its path.", "A family of dolphins playfully swim alongside a rainbow that arcs over the crystal-clear waters of a tropical island, creating a magical spectacle.", "A young photographer captures the elusive sight of a double rainbow stretching across a stormy sky, reflecting its vibrant colors in a puddle on the ground.", "A group of children follows a trail of rainbow-colored footprints, leading them to a hidden door that opens into a whimsical world of color and magic.", "An artist uses a magical paintbrush to bring a static black-and-white world to life, as rainbows burst from every stroke, transforming the landscape into a vibrant masterpiece.", "A majestic unicorn leaps through a field of wildflowers, leaving trails of shimmering rainbows in its wake, as it races towards the horizon.", "On a rainy day, a young girl jumps in puddles while wearing a pair of rain boots that leave behind colorful rainbow footprints with every splash.", "In a desert oasis, a group of camels walk along a sandy path, their shadows creating a mesmerizing display of rainbow-colored patterns on the golden dunes.", "A scientist discovers a hidden portal that allows her to travel through time, chasing rainbows across different eras and capturing their beauty on a magical camera.", "In a bustling city, a street artist paints a massive mural of a rainbow staircase that seems to come alive, inviting people to climb into a world of dreams.", "A flock of colorful birds soar through the sky, their vibrant feathers leaving behind a trail of rainbow-colored streaks, creating a breathtaking aerial display.", "A group of children release a fleet of multi-colored balloons into the sky, each balloon carrying a wish, as they watch the rainbows painted by the rising sun.", "A young boy sets out on a quest to find the pot of gold at the end of the rainbow, encountering mythical creatures and solving riddles along the way.", "In a snowy landscape, a snowboarder glides down a slope, leaving behind a trail of rainbow-colored powder, creating a surreal and dazzling spectacle.", "A musician plays a magical instrument, and with every note, a dancing rainbow emerges, swirling and twirling to the rhythm of the music.", "A group of friends explores a hidden cave, where they stumble upon a chamber filled with glowing crystals that refract light, casting rainbows on the walls.", "A woman with a colorful umbrella walks through a city street on a rainy day, her umbrella casting a beautiful rainbow shadow on the pavement.", "A field of sunflowers stretches towards the horizon, each flower turning its face towards the sun, creating a sea of rainbow hues that sway with the wind.", "A group of children running through a field of wildflowers, their laughter echoing as they chase after a rainbow that seems to dance just out of reach.", "A majestic white unicorn galloping through a dense forest, its silver mane flowing in the wind as it follows a radiant rainbow that lights up the sky.", "A young artist meticulously painting a vivid rainbow on a blank canvas, each brushstroke bringing the colors to life and creating a mesmerizing masterpiece.", "An adventurous couple hiking up a steep mountain, determined to reach the peak where they believe a pot of gold awaits at the end of a glorious rainbow.", "A futuristic cityscape with holographic rainbow bridges connecting towering skyscrapers, creating a vibrant and magical urban landscape.", "A graceful ballet dancer twirling on a stage, her flowing rainbow-colored tutu creating a mesmerizing display of movement and color.", "A serene lakeside scene, with a lone fisherman in a small boat, casting his line towards a vivid rainbow reflected in the calm waters.", "A group of friends riding colorful bicycles down a winding coastal road, their laughter and the vibrant hues of their bikes creating a kaleidoscope of joy.", "A fantastical carnival with whimsical rides and vibrant tents, where children excitedly chase after rainbow-colored balloons floating in the air.", "A cozy living room with a roaring fireplace, where a family gathers to watch the rain outside, their faces illuminated by a rainbow peeking through the window.", "A bustling marketplace in an exotic city, filled with vibrant stalls selling rainbow-colored spices, fabrics, and trinkets from around the world.", "An astronaut floating weightlessly in space, awestruck by the sight of Earth below, its atmosphere creating a stunning rainbow halo around the planet.", "A young girl releasing a handful of colorful butterflies into the air, their delicate wings shimmering in the sunlight as they follow a rainbow into the distance.", "A tranquil forest glade, where a magical creature with iridescent wings flits among the trees, leaving trails of rainbow dust in its wake.", "A vintage carousel with intricately painted horses, spinning round and round under a canopy of rainbow-colored lights, transporting riders to a bygone era.", "A bustling city street after a rainstorm, with rainbow-colored umbrellas dotting the sidewalks as people hurry to find shelter from the showers.", "A tropical island paradise with pristine white beaches and crystal-clear turquoise waters, where a rainbow stretches across the sky, framing a picture-perfect scene.", "A young girl blowing bubbles in a sunlit garden, each bubble reflecting a different color of the rainbow and floating gently through the air.", "A vibrant field of wildflowers, where a group of horses with rainbow-colored manes graze peacefully, creating a stunning contrast against the green landscape.", "A magical forest with towering trees covered in rainbow-colored leaves, where mythical creatures play hide-and-seek among the vibrant foliage.", "A bustling art studio filled with artists working on large canvases, each one depicting their own interpretation of a rainbow, resulting in a colorful and eclectic collection.", "Two children running through a field of wildflowers, their laughter echoing as they chase a vibrant rainbow that seems to dance just out of reach.", "A group of friends hiking up a mountain, their eyes widening in awe as they spot a double rainbow stretching across the sky, urging them to keep climbing.", "A solitary figure standing on the edge of a cliff, reaching out towards a fading rainbow, as if trying to capture its colors in their hands.", "A bustling city street after a rainstorm, with people hurrying under umbrellas, their reflections on the wet pavement creating a mesmerizing mosaic of colors.", "A young artist sitting in their studio, brushes and paints scattered around them, as they try to capture the elusive beauty of a rainbow on canvas.", "A rainbow-colored hot air balloon floating above a serene countryside, its passengers peering out in wonder at the breathtaking view below.", "A pair of lovers sharing a passionate kiss under a brilliant rainbow, their embrace illuminated by the vibrant colors surrounding them.", "A little girl dressed in a rainbow-colored costume, twirling and dancing in the rain, creating a magical display of colors with every movement.", "A group of musicians playing lively tunes on instruments made entirely of rainbow-hued glass, their melodies filling the air with pure joy.", "A sparkling waterfall cascading down a mountainside, its mist creating a shimmering rainbow that seems to merge with the flowing water.", "A futuristic cityscape at night, with neon lights reflecting off rain-soaked streets, creating a mesmerizing display of rainbows in every direction.", "A majestic peacock spreading its iridescent feathers, each feather displaying a different color of the rainbow, creating a stunning visual spectacle.", "A child releasing a cluster of colorful balloons into the sky, their vibrant hues contrasting beautifully against the backdrop of a fading rainbow.", "A cozy living room filled with a collection of vintage kaleidoscopes, each one revealing a unique and mesmerizing rainbow pattern when looked through.", "A field of sunflowers standing tall, their golden petals creating a striking contrast against the vivid backdrop of a rainbow stretching across the sky.", "A group of friends gathered around a bonfire on a beach, roasting marshmallows as they watch the sun set behind a pastel-colored rainbow.", "A street artist painting a mural on a gray wall, their vibrant brushstrokes gradually forming a breathtaking rainbow that brings life to the surroundings.", "A pair of ballet dancers gracefully twirling on a stage, their tutus adorned with shimmering rainbow-colored sequins, captivating the audience.", "A quaint village nestled in the mountains, with colorful houses and gardens blooming with flowers, as a rainbow arches overhead, blessing the town.", "A child blowing bubbles in a park, their soapy creations catching the sunlight and transforming into a multitude of miniature rainbows."], "theme_counter": 0, "question_counter": 0}} \ No newline at end of file From 51f09818e68464d6395cf97e4d4a3e379ea16448 Mon Sep 17 00:00:00 2001 From: Giga Chkhikvadze Date: Tue, 13 Feb 2024 10:14:19 +0000 Subject: [PATCH 17/24] fix: set weight periodically --- validators/text_validator.py | 3 ++- validators/weight_setter.py | 49 ++++++++++++++++++++++++++++++------ 2 files changed, 44 insertions(+), 8 deletions(-) diff --git a/validators/text_validator.py b/validators/text_validator.py index 96ccc050..08755930 100644 --- a/validators/text_validator.py +++ b/validators/text_validator.py @@ -125,13 +125,14 @@ async def score_responses( query_responses: list[tuple[int, str]], # [(uid, response)] uid_to_question: dict[int, str], # uid -> prompt metagraph: bt.metagraph, + is_score_all : False ) -> tuple[torch.Tensor, dict[int, float], dict]: scores = torch.zeros(len(metagraph.hotkeys)) uid_scores_dict = {} response_tasks = [] # Decide to score all UIDs this round based on a chance - will_score_all = self.should_i_score() + will_score_all = True if is_score_all else self.should_i_score() for uid, response in query_responses: self.wandb_data["responses"][uid] = response diff --git a/validators/weight_setter.py b/validators/weight_setter.py index 220f7eab..5cb4332b 100644 --- a/validators/weight_setter.py +++ b/validators/weight_setter.py @@ -52,9 +52,21 @@ def __init__(self, loop: asyncio.AbstractEventLoop, dendrite, subtensor, config, self.loop.create_task(self.update_available_uids_periodically()) self.available_uids = {} self.loop.create_task(self.consume_organic_scoring()) - # self.loop.create_task(self.perform_synthetic_scoring_and_update_weights()) - + self.loop.create_task(self.perform_synthetic_scoring_and_update_weights()) + self.loop.create_task(self.update_weights_periodically()) + + async def update_weights_periodically(self): + while True: + if len(self.available_uids) == 0 or \ + torch.all(self.total_scores == 0): + await asyncio.sleep(10) + continue + + await self.update_weights(self.steps_passed) + await asyncio.sleep(600) # 600 seconds = 10 minutes + + async def update_available_uids_periodically(self): while True: self.metagraph = await self.run_sync_in_async(lambda: self.subtensor.metagraph(self.config.netuid)) @@ -99,16 +111,18 @@ async def consume_organic_scoring(self): async def perform_synthetic_scoring_and_update_weights(self): while True: - for steps_passed in itertools.count(): - # self.metagraph = await self.run_sync_in_async(lambda: self.subtensor.metagraph(self.config.netuid)) + if len(self.available_uids) == 0: + await asyncio.sleep(10) + continue + for steps_passed in itertools.count(): available_uids = self.available_uids selected_validator = self.select_validator(steps_passed) scores, _ = await self.process_modality(selected_validator, available_uids) self.total_scores += scores steps_since_last_update = steps_passed % iterations_per_set_weights - + if steps_since_last_update == iterations_per_set_weights - 1: await self.update_weights(steps_passed) else: @@ -200,22 +214,43 @@ async def set_weights(self, scores): ) bt.logging.success("Successfully set weights.") + def handle_task_result_organic_query(self, task): + try: + success, data = task.result() + if success: + scores, uid_scores_dict, wandb_data = data + if self.config.wandb_on: + wandb.log(wandb_data) + bt.logging.success("wandb_log successful") + self.total_scores += scores + bt.logging.success(f"Task completed successfully. Scores updated.") + else: + bt.logging.error("Task failed. No scores updated.") + except Exception as e: + # Handle exceptions raised during task execution + bt.logging.error(f"handle_task_result_organic_query An error occurred during task execution: {e}") + def register_text_validator_organic_query( self, text_vali, uid_to_response: dict[int, str], # [(uid, response)] messages_dict: dict[int, str], ): - self.organic_scoring_tasks.add(asyncio.create_task( + self.steps_passed += 1 + + task = asyncio.create_task( wait_for_coro_with_limit( text_vali.score_responses( query_responses=list(uid_to_response.items()), uid_to_question=messages_dict, metagraph=self.metagraph, + is_score_all=True ), scoring_organic_timeout ) - )) + ) + task.add_done_callback(self.handle_task_result_organic_query) # Attach the callback + self.organic_scoring_tasks.add(task) class TestWeightSetter(WeightSetter): From 9745b609d0c1133eaa73e072413199596397f559 Mon Sep 17 00:00:00 2001 From: Giga Chkhikvadze Date: Tue, 13 Feb 2024 10:20:43 +0000 Subject: [PATCH 18/24] fix: set weight in perfor synthetic data --- validators/weight_setter.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/validators/weight_setter.py b/validators/weight_setter.py index 5cb4332b..2c5fc297 100644 --- a/validators/weight_setter.py +++ b/validators/weight_setter.py @@ -121,14 +121,14 @@ async def perform_synthetic_scoring_and_update_weights(self): scores, _ = await self.process_modality(selected_validator, available_uids) self.total_scores += scores - steps_since_last_update = steps_passed % iterations_per_set_weights + # steps_since_last_update = steps_passed % iterations_per_set_weights - if steps_since_last_update == iterations_per_set_weights - 1: - await self.update_weights(steps_passed) - else: - bt.logging.info( - f"Updating weights in {iterations_per_set_weights - steps_since_last_update - 1} iterations." - ) + # if steps_since_last_update == iterations_per_set_weights - 1: + # await self.update_weights(steps_passed) + # else: + # bt.logging.info( + # f"Updating weights in {iterations_per_set_weights - steps_since_last_update - 1} iterations." + # ) await asyncio.sleep(10) From c01c0e66109a73b9f0db5588ff1c8389dbffc2fb Mon Sep 17 00:00:00 2001 From: Giga Chkhikvadze Date: Tue, 13 Feb 2024 10:24:52 +0000 Subject: [PATCH 19/24] fix: score response default value --- validators/text_validator.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/validators/text_validator.py b/validators/text_validator.py index 08755930..faae8a02 100644 --- a/validators/text_validator.py +++ b/validators/text_validator.py @@ -125,7 +125,7 @@ async def score_responses( query_responses: list[tuple[int, str]], # [(uid, response)] uid_to_question: dict[int, str], # uid -> prompt metagraph: bt.metagraph, - is_score_all : False + is_score_all=False ) -> tuple[torch.Tensor, dict[int, float], dict]: scores = torch.zeros(len(metagraph.hotkeys)) uid_scores_dict = {} From 4b8ea1a8f0d3575575fa64ba3ecb7996f292aa82 Mon Sep 17 00:00:00 2001 From: Giga Chkhikvadze Date: Tue, 13 Feb 2024 10:57:45 +0000 Subject: [PATCH 20/24] fix: weight setter --- validators/weight_setter.py | 24 ++++++++---------------- 1 file changed, 8 insertions(+), 16 deletions(-) diff --git a/validators/weight_setter.py b/validators/weight_setter.py index 2c5fc297..0ffa12b2 100644 --- a/validators/weight_setter.py +++ b/validators/weight_setter.py @@ -114,23 +114,15 @@ async def perform_synthetic_scoring_and_update_weights(self): if len(self.available_uids) == 0: await asyncio.sleep(10) continue + + available_uids = self.available_uids + selected_validator = self.select_validator(self.steps_passed) + scores, _ = await self.process_modality(selected_validator, available_uids) + self.total_scores += scores + + self.steps_passed+=1 + await asyncio.sleep(10) - for steps_passed in itertools.count(): - available_uids = self.available_uids - selected_validator = self.select_validator(steps_passed) - scores, _ = await self.process_modality(selected_validator, available_uids) - self.total_scores += scores - - # steps_since_last_update = steps_passed % iterations_per_set_weights - - # if steps_since_last_update == iterations_per_set_weights - 1: - # await self.update_weights(steps_passed) - # else: - # bt.logging.info( - # f"Updating weights in {iterations_per_set_weights - steps_since_last_update - 1} iterations." - # ) - - await asyncio.sleep(10) def select_validator(self, steps_passed): return self.text_vali if steps_passed % 5 in (0, 1, 2, 3) else self.image_vali From a306247b50c7d2bad7c628d939b06572742f7776 Mon Sep 17 00:00:00 2001 From: Giga Chkhikvadze Date: Tue, 13 Feb 2024 11:06:26 +0000 Subject: [PATCH 21/24] fix: weights update time --- validators/weight_setter.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/validators/weight_setter.py b/validators/weight_setter.py index 0ffa12b2..32459a5b 100644 --- a/validators/weight_setter.py +++ b/validators/weight_setter.py @@ -64,7 +64,7 @@ async def update_weights_periodically(self): continue await self.update_weights(self.steps_passed) - await asyncio.sleep(600) # 600 seconds = 10 minutes + await asyncio.sleep(1800) async def update_available_uids_periodically(self): From b4a91b96f186078c8778140c497a670c40e64407 Mon Sep 17 00:00:00 2001 From: Giga Chkhikvadze Date: Tue, 13 Feb 2024 11:16:45 +0000 Subject: [PATCH 22/24] fix: synthetic data run every 10 minutes --- validators/weight_setter.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/validators/weight_setter.py b/validators/weight_setter.py index 32459a5b..3b859d5a 100644 --- a/validators/weight_setter.py +++ b/validators/weight_setter.py @@ -121,7 +121,7 @@ async def perform_synthetic_scoring_and_update_weights(self): self.total_scores += scores self.steps_passed+=1 - await asyncio.sleep(10) + await asyncio.sleep(600) def select_validator(self, steps_passed): From 4442de02ad57aef488c8effdf88c699b128f7261 Mon Sep 17 00:00:00 2001 From: Giga Chkhikvadze Date: Tue, 13 Feb 2024 12:37:29 +0000 Subject: [PATCH 23/24] refactor: periodicall update --- validators/weight_setter.py | 41 ++++++++++++++++++++++++++----------- 1 file changed, 29 insertions(+), 12 deletions(-) diff --git a/validators/weight_setter.py b/validators/weight_setter.py index 3b859d5a..ec4758e0 100644 --- a/validators/weight_setter.py +++ b/validators/weight_setter.py @@ -58,26 +58,43 @@ def __init__(self, loop: asyncio.AbstractEventLoop, dendrite, subtensor, config, async def update_weights_periodically(self): while True: - if len(self.available_uids) == 0 or \ - torch.all(self.total_scores == 0): - await asyncio.sleep(10) - continue + try: + if len(self.available_uids) == 0 or torch.all(self.total_scores == 0): + await asyncio.sleep(10) + continue - await self.update_weights(self.steps_passed) - await asyncio.sleep(1800) + await self.update_weights(self.steps_passed) + except Exception as e: + # Log the exception or handle it as needed + bt.logging.error(f"An error occurred in update_weights_periodically: {e}") + # Optionally, decide whether to continue or break the loop based on the exception + finally: + # Ensure the sleep is in the finally block if you want the loop to always wait, + # even if an error occurs. + await asyncio.sleep(1800) # Sleep for 30 minutes async def update_available_uids_periodically(self): while True: - self.metagraph = await self.run_sync_in_async(lambda: self.subtensor.metagraph(self.config.netuid)) start_time = time.time() - self.available_uids = await self.get_available_uids() - uid_list = self.shuffled(list(self.available_uids.keys())) - bt.logging.info(f"Number of available UIDs for periodic update: {len(uid_list)}, UIDs: {uid_list}") - + try: + # It's assumed run_sync_in_async is a method that correctly handles running synchronous code in async. + # If not, ensure it's properly implemented to avoid blocking the event loop. + self.metagraph = await self.run_sync_in_async(lambda: self.subtensor.metagraph(self.config.netuid)) + + # Directly await the asynchronous method without intermediate assignment to self.available_uids, + # unless it's used elsewhere. + available_uids = await self.get_available_uids() + uid_list = self.shuffled(list(available_uids.keys())) # Ensure shuffled is properly defined to work with async. + + bt.logging.info(f"update_available_uids_periodically Number of available UIDs for periodic update: {len(uid_list)}, UIDs: {uid_list}") + except Exception as e: + bt.logging.error(f"update_available_uids_periodically Failed to update available UIDs: {e}") + # Consider whether to continue or break the loop upon certain errors. + end_time = time.time() execution_time = end_time - start_time - bt.logging.info(f"Execution time for getting available UIDs amound is: {execution_time} seconds") + bt.logging.info(f"update_available_uids_periodically Execution time for getting available UIDs amount is: {execution_time} seconds") await asyncio.sleep(600) # 600 seconds = 10 minutes From 504d6933d85e59945cf7c1fcdbe4d19e0a00d462 Mon Sep 17 00:00:00 2001 From: Giga Chkhikvadze Date: Wed, 14 Feb 2024 05:45:07 +0000 Subject: [PATCH 24/24] fix: define avalaible uids --- validators/weight_setter.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/validators/weight_setter.py b/validators/weight_setter.py index ec4758e0..310aa71d 100644 --- a/validators/weight_setter.py +++ b/validators/weight_setter.py @@ -49,8 +49,8 @@ def __init__(self, loop: asyncio.AbstractEventLoop, dendrite, subtensor, config, self.thread_executor = concurrent.futures.ThreadPoolExecutor(thread_name_prefix='asyncio') self.steps_passed = 0 - self.loop.create_task(self.update_available_uids_periodically()) self.available_uids = {} + self.loop.create_task(self.update_available_uids_periodically()) self.loop.create_task(self.consume_organic_scoring()) self.loop.create_task(self.perform_synthetic_scoring_and_update_weights())