Skip to content

Commit 34b8a64

Browse files
committed
feat: update default behavior to always stop on error
1 parent b0741ad commit 34b8a64

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

parea/client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,7 @@ def experiment(
352352
metadata: Optional[Dict[str, str]] = None,
353353
dataset_level_evals: Optional[List[Callable]] = None,
354354
n_workers: int = 10,
355-
stop_on_error: bool = False,
355+
stop_on_error: bool = True,
356356
):
357357
"""
358358
:param data: If your dataset is defined locally it should be an iterable of k/v

parea/experiment/experiment.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ async def experiment(
9393
n_trials: int = 1,
9494
dataset_level_evals: Optional[List[Callable]] = None,
9595
n_workers: int = 10,
96-
stop_on_error: bool = False,
96+
stop_on_error: bool = True,
9797
) -> ExperimentStatsSchema:
9898
"""Creates an experiment and runs the function on the data iterator.
9999
param experiment_name: The name of the experiment. Used to organize experiments within a project.
@@ -156,7 +156,7 @@ def limit_concurrency_sync(sample):
156156
except Exception as e:
157157
status = ExperimentStatus.FAILED
158158
if stop_on_error:
159-
print(f"\nExperiment stopped due to an error: {str(e)}\n")
159+
print(f"\nExperiment stopped due to an error (note you can deactivate this behavior by setting stop_on_error=False): {str(e)}\n")
160160
for task in tasks:
161161
task.cancel()
162162
else:
@@ -225,7 +225,7 @@ class Experiment:
225225
n_workers: int = field(default=10)
226226
# The number of times to run the experiment on the same data.
227227
n_trials: int = field(default=1)
228-
stop_on_error: bool = field(default=False)
228+
stop_on_error: bool = field(default=True)
229229

230230
def __attrs_post_init__(self):
231231
global _experiments

0 commit comments

Comments
 (0)