Skip to content

Commit 07e530b

Browse files
refactor: remove import not used (#2364)
See #2363
1 parent d193bab commit 07e530b

File tree

1 file changed

+1
-22
lines changed

1 file changed

+1
-22
lines changed

src/ragas/testset/transforms/engine.py

Lines changed: 1 addition & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,7 @@
33
import logging
44
import typing as t
55

6-
from tqdm.auto import tqdm
7-
8-
from ragas.async_utils import apply_nest_asyncio, as_completed, run_async_tasks
6+
from ragas.async_utils import apply_nest_asyncio, run_async_tasks
97
from ragas.run_config import RunConfig
108
from ragas.testset.graph import KnowledgeGraph
119
from ragas.testset.transforms.base import BaseGraphTransformation
@@ -45,25 +43,6 @@ def generate_execution_plan(self, kg: KnowledgeGraph) -> t.Sequence[t.Coroutine]
4543
return coroutines
4644

4745

48-
async def run_coroutines(
49-
coroutines: t.Sequence[t.Coroutine], desc: str, max_workers: int
50-
):
51-
"""
52-
Run a sequence of coroutines in parallel.
53-
"""
54-
for future in tqdm(
55-
as_completed(coroutines, max_workers=max_workers),
56-
desc=desc,
57-
total=len(coroutines),
58-
# whether you want to keep the progress bar after completion
59-
leave=False,
60-
):
61-
try:
62-
await future
63-
except Exception as e:
64-
logger.error(f"unable to apply transformation: {e}")
65-
66-
6746
def get_desc(transform: BaseGraphTransformation | Parallel):
6847
if isinstance(transform, Parallel):
6948
transform_names = [t.__class__.__name__ for t in transform.transformations]

0 commit comments

Comments
 (0)