Skip to content

Commit 02bf429

Browse files
committed
Load WorldSense dataset at runtime
1 parent da8bcc5 commit 02bf429

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/inspect_evals/worldsense/worldsense.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,8 @@ def worldsense(problemnames: str | list[str] = []) -> Task:
5252
Returns:
5353
Task: A task object configured with a dataset filtered by problem names (if specified), a solver, a scoring pattern for evaluating task responses, and custom metrics.
5454
"""
55+
dataset = load_worldsense_dataset(sample_fields=record_to_sample, shuffle=True)
56+
5557
# filter dataset if requested
5658
problemnames = problemnames if isinstance(problemnames, list) else [problemnames]
5759
if len(problemnames) > 0:
@@ -139,9 +141,6 @@ def load_worldsense_dataset(
139141
return dataset
140142

141143

142-
dataset = load_worldsense_dataset(sample_fields=record_to_sample, shuffle=True)
143-
144-
145144
@scorer(metrics=[accuracy(), stderr()])
146145
def pattern_with_metadata(
147146
pattern_str: str, ignore_case: bool = True, match_all: bool = False

0 commit comments

Comments
 (0)