Skip to content

Commit

Permalink
Revert stray changes
Browse files Browse the repository at this point in the history
  • Loading branch information
yifanmai committed Aug 19, 2023
1 parent 42a0246 commit 727ea4f
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/helm/benchmark/presentation/summarize.py
Original file line number Diff line number Diff line change
Expand Up @@ -247,8 +247,6 @@ def __init__(self, suite: str, output_path: str, verbose: bool, num_threads: int
self.contamination = read_contamination()
validate_contamination(self.contamination, self.schema)

self._model_group_overlap_stats: Dict[Tuple[str, str], GroupOverlapStats] = {}

def read_run(self, run_path: str) -> Run:
"""Load the `Run` object from `run_path`."""

Expand Down Expand Up @@ -322,7 +320,7 @@ def read_runs(self):
self.group_adapter_to_runs[group_name][adapter_spec].append(run)
self.group_scenario_adapter_to_runs[group_name][scenario_spec][adapter_spec].append(run)

def read_overlap_stats(self) -> None:
def read_overlap_stats(self):
"""
Load the overlap stats in the run suite path.
Concretely:
Expand Down Expand Up @@ -384,11 +382,15 @@ def get_stats_file_metadata(data_overlap_dir: str) -> Dict[str, List[str]]:

return file_metadata

group_to_scenario_specs = get_group_to_scenario_specs([run.run_spec for run in self.runs])
self._model_group_overlap_stats: Dict[Tuple[str, str], GroupOverlapStats] = {}

data_overlap_dir = os.path.join(self.run_suite_path, "data_overlap")
if os.path.isdir(data_overlap_dir):
if not os.path.isdir(data_overlap_dir):
hlog(f"Directory {data_overlap_dir} not found; skipped import of overlap results.")
return

group_to_scenario_specs = get_group_to_scenario_specs([run.run_spec for run in self.runs])

stats_file_metadata = get_stats_file_metadata(data_overlap_dir)

for file_path, model_names in stats_file_metadata.items():
Expand Down

0 comments on commit 727ea4f

Please sign in to comment.