Skip to content

Commit cecbc3e

Browse files
committed
feat: add back progress bar
1 parent 4168c01 commit cecbc3e

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed

parea/cookbook/evals_and_experiments/run_experiment_using_saved_test_collection.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,10 @@ def func(lang: str, framework: str) -> str:
3636

3737
if __name__ == "__main__":
3838
p.experiment(
39+
name="Hello World Example", # this is the name of the experiment
3940
data="Hello World Example", # this is the name of your Dataset in Parea (Dataset page)
4041
func=func,
41-
).run(name="hello-world-example")
42+
).run()
4243

4344
# Or use a dataset using its ID instead of the name
4445
# p.experiment(

parea/experiment/experiment.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,7 @@
1919
from parea.experiment.dvc import save_results_to_dvc_if_init
2020
from parea.helpers import duplicate_dicts, gen_random_name, is_logging_disabled
2121
from parea.schemas import EvaluationResult
22-
from parea.schemas.models import CreateExperimentRequest, ExperimentSchema, ExperimentStatsSchema, \
23-
FinishExperimentRequestSchema, ExperimentStatus
22+
from parea.schemas.models import CreateExperimentRequest, ExperimentSchema, ExperimentStatsSchema, ExperimentStatus, FinishExperimentRequestSchema
2423
from parea.utils.trace_utils import thread_ids_running_evals, trace_data
2524
from parea.utils.universal_encoder import json_dumps
2625

@@ -143,8 +142,7 @@ def limit_concurrency_sync(sample):
143142
else:
144143
executor = ThreadPoolExecutor(max_workers=n_workers)
145144
loop = asyncio.get_event_loop()
146-
tasks = [asyncio.ensure_future(loop.run_in_executor(executor, partial(limit_concurrency_sync, sample))) for
147-
sample in data]
145+
tasks = [asyncio.ensure_future(loop.run_in_executor(executor, partial(limit_concurrency_sync, sample))) for sample in data]
148146

149147
status = ExperimentStatus.COMPLETED
150148
with tqdm(total=len(tasks), desc="Running samples", unit="sample") as pbar:

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ build-backend = "poetry.core.masonry.api"
66
[tool.poetry]
77
name = "parea-ai"
88
packages = [{ include = "parea" }]
9-
version = "0.2.174"
9+
version = "0.2.175"
1010
description = "Parea python sdk"
1111
readme = "README.md"
1212
authors = ["joel-parea-ai <[email protected]>"]

0 commit comments

Comments
 (0)