Skip to content

Commit

Permalink
Merge pull request #15 from sanchit-gandhi/llm-swarm-fix
Browse files Browse the repository at this point in the history
[Prompt Creation] Fix LLM Swarm Script
  • Loading branch information
sanchit-gandhi authored May 2, 2024
2 parents 4142f53 + c544cd4 commit 8fd2dd4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions scripts/run_prompt_creation_llm_swarm.py
Original file line number Diff line number Diff line change
Expand Up @@ -308,11 +308,11 @@ async def process_text(sample):
)
except Exception as e:
attempt += 1
if attempt < data_args.max_retries:
if attempt < model_args.max_retries:
print(
f"Request failed due to {e}\nRetrying in {data_args.retry_delay_in_s} seconds... (Attempt {attempt}/{data_args.max_retries})"
f"Request failed due to {e}\nRetrying in {model_args.retry_delay_in_s} seconds... (Attempt {attempt}/{model_args.max_retries})"
)
await asyncio.sleep(data_args.retry_delay_in_s)
await asyncio.sleep(model_args.retry_delay_in_s)
else:
raise ValueError(
f"Max retries reached. Failed with error: {e}."
Expand Down

0 comments on commit 8fd2dd4

Please sign in to comment.