Skip to content

Making bootstrap_iters an arg #697

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/lighteval/logging/info_loggers.py
Original file line number Diff line number Diff line change
Expand Up @@ -527,7 +527,7 @@ def aggregate(self, task_dict: dict[str, LightevalTask], bootstrap_iters: int =
stderr = None # We skip stderr for some corpus metrics that return dicts
else:
aggregation = task.aggregation()[metric_name]
stderr = get_stderr_function(aggregation=aggregation, number_experiments=1000)
stderr = get_stderr_function(aggregation=aggregation, number_experiments=bootstrap_iters)
if stderr is not None and len(metric_values) > 1:
try:
self.metric_aggregated[task_name][f"{metric_name}_stderr"] = stderr(metric_values)
Expand Down
3 changes: 2 additions & 1 deletion src/lighteval/pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ class PipelineParameters:
system_prompt: str | None = None
cot_prompt: str | None = None
load_responses_from_details_date_id: str | None = None
bootstrap_iters: int = 1000

def __post_init__(self): # noqa C901
if self.launcher_type == ParallelismManager.ACCELERATE:
Expand Down Expand Up @@ -292,7 +293,7 @@ def evaluate(self):

if self.is_main_process():
self.evaluation_tracker.general_config_logger.log_end_time()
self.evaluation_tracker.metrics_logger.aggregate(task_dict=self.task_dict, bootstrap_iters=1000)
self.evaluation_tracker.metrics_logger.aggregate(task_dict=self.task_dict, bootstrap_iters=self.pipeline_parameters.bootstrap_iters)
self.evaluation_tracker.details_logger.aggregate()

for weights in ["delta", "adapter"]:
Expand Down
Loading