Skip to content

Commit 98f1658

Browse files
committed
fix: deleted call_async
1 parent b08c359 commit 98f1658

File tree

1 file changed

+1
-6
lines changed
  • autointent/generation/utterances/evolution

1 file changed

+1
-6
lines changed

autointent/generation/utterances/evolution/evolver.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ def _evolve(self, utterance: str, intent_data: Intent) -> str:
4646
return self.generator.get_chat_completion(chat)
4747

4848
async def _evolve_async(self, utterance: str, intent_data: Intent) -> str:
49-
"""Apply evolutions single time asynchronously."""
49+
"""Apply evolutions a single time (asynchronously)."""
5050
maker = random.choice(self.prompt_makers)
5151
chat = maker(utterance, intent_data)
5252
return await self.generator.get_chat_completion_async(chat)
@@ -55,11 +55,6 @@ def __call__(self, utterance: str, intent_data: Intent, n_evolutions: int = 1) -
5555
"""Apply evolutions multiple times (synchronously)."""
5656
return [self._evolve(utterance, intent_data) for _ in range(n_evolutions)]
5757

58-
async def _call_async(self, utterance: str, intent_data: Intent, n_evolutions: int = 1) -> list[str]:
59-
"""Apply evolutions multiple times asynchronously."""
60-
tasks = [self._evolve_async(utterance, intent_data) for _ in range(n_evolutions)]
61-
return await asyncio.gather(*tasks)
62-
6358
def augment(
6459
self,
6560
dataset: Dataset,

0 commit comments

Comments
 (0)