run_optimization should be sync
This commit is contained in:
parent
8f39ccf29c
commit
45f7ac8d1b
2 changed files with 8 additions and 10 deletions
|
|
@ -494,15 +494,13 @@ def optimize(
|
||||||
for index, doc in enumerate(corpus, start=1)
|
for index, doc in enumerate(corpus, start=1)
|
||||||
]
|
]
|
||||||
|
|
||||||
asyncio.run(
|
run_optimization(
|
||||||
run_optimization(
|
spec=spec,
|
||||||
spec=spec,
|
config=app_config,
|
||||||
config=app_config,
|
cases=cases,
|
||||||
cases=cases,
|
max_calls=max_calls,
|
||||||
max_calls=max_calls,
|
db_path=db,
|
||||||
db_path=db,
|
output=output,
|
||||||
output=output,
|
|
||||||
)
|
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -207,7 +207,7 @@ class ReflectionLM:
|
||||||
return result.output
|
return result.output
|
||||||
|
|
||||||
|
|
||||||
async def run_optimization(
|
def run_optimization(
|
||||||
spec: DatasetSpec,
|
spec: DatasetSpec,
|
||||||
config: AppConfig,
|
config: AppConfig,
|
||||||
cases: list[QACase],
|
cases: list[QACase],
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue