Skip to content

Commit 8b7ae43

Browse files
fix(baselines): use asyncio.run
1 parent cac7942 commit 8b7ae43

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

baselines/EntiGraph/entigraph.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
import asyncio
88
import argparse
99
from hashlib import md5
10+
11+
from statsmodels.graphics.tukeyplot import results
1012
from tqdm.asyncio import tqdm as tqdm_async
1113

1214
from baselines.EntiGraph.inference.devapi import gptqa
@@ -233,8 +235,7 @@ async def generate_qa_sft(content):
233235

234236
args = parser.parse_args()
235237

236-
loop = asyncio.get_event_loop()
237-
results = loop.run_until_complete(generate_synthetic_data_for_document(args.input_file, args.data_type))
238+
results = asyncio.run(generate_synthetic_data_for_document(args.input_file, args.data_type))
238239

239240
# Save results
240241
with open(args.output_file, "w", encoding='utf-8') as f:

0 commit comments

Comments
 (0)