Skip to content
Closed
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: 2 additions & 0 deletions .github/workflows/makefile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ jobs:

steps:
- uses: actions/checkout@v3
with:
submodules: true

- name: Set up Python
uses: actions/setup-python@v3
Expand Down
15 changes: 12 additions & 3 deletions src/helpers/resolution.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,24 @@ def make_columns_hashable(df):
return BaseSource._make_columns_hashable(df)


def get_resolution_values() -> dict[str, dict[str, pd.DataFrame]]:
"""Get resolution values from GCP. Delegates to orchestration._io.load_question_bank().
def get_and_unpack_question_bank(
sources_to_get: list[str] | None = None,
) -> dict[str, dict[str, pd.DataFrame]]:
"""Download and unpack the question bank.

Backward-compat wrapper around `orchestration._io.load_question_bank()` that
converts `SourceQuestionBank` objects back to the plain-dict shape consumed
by the not-yet-refactored baseline evals job.

Args:
sources_to_get: List of source names. Defaults to all sources.

Returns:
{source: {"dfq": pd.DataFrame, "dfr": pd.DataFrame}} by source.
"""
from orchestration._io import load_question_bank

question_bank = load_question_bank()
question_bank = load_question_bank(sources_to_get=sources_to_get)
return {source: {"dfq": sqb.dfq, "dfr": sqb.dfr} for source, sqb in question_bank.items()}


Expand Down
Loading