Skip to content

Commit f2fba92

Browse files
committed
minor re-formatting
1 parent b732fe9 commit f2fba92

3 files changed

Lines changed: 8 additions & 11 deletions

File tree

src/maxtext/eval/runner/harness_runner.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -159,14 +159,14 @@ def run_harness(cfg: dict, hf_token: str | None = None) -> dict:
159159
lm_model_type,
160160
server.base_url,
161161
)
162-
simple_eval_kwargs: dict = dict(
163-
model=lm_model_type,
164-
model_args=model_args,
165-
tasks=tasks,
166-
num_fewshot=num_fewshot,
167-
limit=num_samples,
168-
log_samples=False,
169-
)
162+
simple_eval_kwargs: dict = {
163+
"model": lm_model_type,
164+
"model_args": model_args,
165+
"tasks": tasks,
166+
"num_fewshot": num_fewshot,
167+
"limit": num_samples,
168+
"log_samples": False,
169+
}
170170
if apply_chat_template:
171171
simple_eval_kwargs["apply_chat_template"] = True
172172
if fewshot_as_multiturn:

src/maxtext/eval/runner/server_manager.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818

1919
import logging
2020
import os
21-
import sys
2221
import threading
2322
import time
2423
import uuid

tests/unit/eval/test_build_app.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -242,8 +242,6 @@ def test_completions_token_id_prompt_normalised_as_single(self):
242242

243243
def test_completions_top_logprobs_populated(self):
244244
"""When logprobs is requested, top_logprobs entries must be non-None dicts."""
245-
from types import SimpleNamespace # pylint: disable=import-outside-toplevel
246-
247245
mock_output = _make_mock_output(generated_text="hi", prompt_token_ids=[1], generated_token_ids=[4, 5])
248246
mock_output.outputs[0].logprobs = [
249247
{4: SimpleNamespace(logprob=-0.5), 6: SimpleNamespace(logprob=-1.0)},

0 commit comments

Comments
 (0)