|
1 | | -@testset "LLMBenchSimple Integration" begin |
2 | | - # Create a test module directly |
3 | | - module SimpleBenchModule |
4 | | - using LLMBenchSimple: _setup_problem_impl, _grade_impl, PromptPlaceholder |
5 | | - |
6 | | - # Create module-local benchmarks |
7 | | - const BENCHMARKS = Dict{String, Any}() |
| 1 | +# Create a test module directly |
| 2 | +module SimpleBenchModule |
| 3 | + using LLMBenchSimple: _setup_problem_impl, _grade_impl, PromptPlaceholder |
| 4 | + |
| 5 | + # Create module-local benchmarks |
| 6 | + const BENCHMARKS = Dict{String, Any}() |
| 7 | + |
| 8 | + function __init__() |
| 9 | + # Clear any existing benchmarks |
| 10 | + empty!(BENCHMARKS) |
8 | 11 |
|
9 | | - function __init__() |
10 | | - # Clear any existing benchmarks |
11 | | - empty!(BENCHMARKS) |
12 | | - |
13 | | - # Add benchmarks manually |
14 | | - BENCHMARKS["math1"] = ( |
15 | | - prompt_expr = :(PromptPlaceholder("What is 5 + 3?") == 8), |
16 | | - original_expr = nothing |
17 | | - ) |
18 | | - |
19 | | - BENCHMARKS["math2"] = ( |
20 | | - prompt_expr = :(PromptPlaceholder("What is 10 - 4?") == 6), |
21 | | - original_expr = nothing |
22 | | - ) |
23 | | - end |
| 12 | + # Add benchmarks manually |
| 13 | + BENCHMARKS["math1"] = ( |
| 14 | + prompt_expr = :(PromptPlaceholder("What is 5 + 3?") == 8), |
| 15 | + original_expr = nothing |
| 16 | + ) |
24 | 17 |
|
25 | | - # Create wrapper functions that use our module's benchmarks |
26 | | - function setup_problem(workdir::String, problem_id::String="") |
27 | | - return _setup_problem_impl(@__MODULE__, workdir, problem_id) |
28 | | - end |
29 | | - |
30 | | - function grade(workdir::String, transcript::String, problem_id::String="") |
31 | | - return _grade_impl(@__MODULE__, workdir, transcript, problem_id) |
32 | | - end |
33 | | - end # module |
| 18 | + BENCHMARKS["math2"] = ( |
| 19 | + prompt_expr = :(PromptPlaceholder("What is 10 - 4?") == 6), |
| 20 | + original_expr = nothing |
| 21 | + ) |
| 22 | + end |
34 | 23 |
|
| 24 | + # Create wrapper functions that use our module's benchmarks |
| 25 | + function setup_problem(workdir::String, problem_id::String="") |
| 26 | + return _setup_problem_impl(@__MODULE__, workdir, problem_id) |
| 27 | + end |
| 28 | + |
| 29 | + function grade(workdir::String, transcript::String, problem_id::String="") |
| 30 | + return _grade_impl(@__MODULE__, workdir, transcript, problem_id) |
| 31 | + end |
| 32 | +end # module |
| 33 | + |
| 34 | +@testset "LLMBenchSimple Integration" begin |
35 | 35 | @testset "Module with LLMBenchSimple functions" begin |
36 | 36 | # Get the module |
37 | 37 | mod = Main.SimpleBenchModule |
|
0 commit comments