@@ -48,11 +48,11 @@ def _make_eval_log(
4848 EvalSample (
4949 id = s .get ("id" , f"q{ i } " ),
5050 epoch = 1 ,
51- input = [{"role" : "user" , "content" : [{"type" : "text" , "text" : "test?" }]}],
51+ input = [{"role" : "user" , "content" : [{"type" : "text" , "text" : "test?" }]}], # ty: ignore[invalid-argument-type]
5252 choices = ["A" , "B" ],
5353 target = s .get ("target" , "A" ),
54- output = {"message" : {"role" : "assistant" , "content" : s .get ("target" , "A" )}},
55- score = Score (value = s .get ("score" , "A" ), answer = s .get ("target" , "A" )),
54+ output = {"message" : {"role" : "assistant" , "content" : s .get ("target" , "A" )}}, # ty: ignore[invalid-argument-type]
55+ score = Score (value = s .get ("score" , "A" ), answer = s .get ("target" , "A" )), # ty: ignore[unknown-argument]
5656 metadata = s .get ("metadata" , {}),
5757 )
5858 for i , s in enumerate (samples or [])
@@ -77,15 +77,15 @@ def _make_eval_log(
7777 samples = 3 ,
7878 ),
7979 model = model ,
80- model_generate_config = {},
80+ model_generate_config = {}, # ty: ignore[invalid-argument-type]
8181 model_args = {},
8282 config = EvalConfig (),
8383 packages = {"inspect_ai" : "0.3.0" },
8484 ),
8585 plan = EvalPlan (
8686 name = "plan" ,
87- steps = [{"solver" : "multiple_choice" , "params" : {}}],
88- config = {},
87+ steps = [{"solver" : "multiple_choice" , "params" : {}}], # ty: ignore[invalid-argument-type]
88+ config = {}, # ty: ignore[invalid-argument-type]
8989 ),
9090 results = EvalResults (
9191 total_samples = len (eval_samples ),
@@ -169,9 +169,9 @@ class TestLeaderboard:
169169
170170 def test_builds_leaderboard_with_logs (self , logs_with_results : Path ):
171171 """Leaderboard renders with existing logs."""
172- from src . app .app import build_leaderboard
172+ from app .app import build_leaderboard
173173
174- with patch ("src. app.app.LOGS_DIR" , logs_with_results ):
174+ with patch ("app.app.LOGS_DIR" , logs_with_results ):
175175 data , headers = build_leaderboard ()
176176
177177 assert headers == ["Model" , "Overall" , "By Category" , "By Subject" ]
@@ -181,17 +181,17 @@ def test_builds_leaderboard_with_logs(self, logs_with_results: Path):
181181
182182 def test_empty_logs_returns_empty_table (self , empty_logs : Path ):
183183 """App renders without crashing on empty logs."""
184- from src . app .app import build_leaderboard
184+ from app .app import build_leaderboard
185185
186- with patch ("src. app.app.LOGS_DIR" , empty_logs ):
186+ with patch ("app.app.LOGS_DIR" , empty_logs ):
187187 data , headers = build_leaderboard ()
188188
189189 assert data == []
190190 assert headers == ["Model" , "Overall" , "By Category" , "By Subject" ]
191191
192192 def test_accuracy_computed_correctly (self , logs_with_results : Path ):
193193 """Accuracy values computed correctly from fixture log data."""
194- from src . app .app import _extract_accuracy
194+ from app .app import _extract_accuracy
195195
196196 log_path = logs_with_results / "openrouter_google_gemma-4-31b-it.eval"
197197 data = _extract_accuracy (log_path )
@@ -203,8 +203,8 @@ def test_accuracy_computed_correctly(self, logs_with_results: Path):
203203
204204 def test_app_creates_without_error (self , logs_with_results : Path ):
205205 """Gradio app creates without error."""
206- from src . app .app import create_app
206+ from app .app import create_app
207207
208- with patch ("src. app.app.LOGS_DIR" , logs_with_results ):
208+ with patch ("app.app.LOGS_DIR" , logs_with_results ):
209209 app = create_app ()
210210 assert app is not None
0 commit comments