Skip to content

Commit

Permalink
fixed black version
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewwan0131 committed Feb 14, 2025
1 parent 701f7c5 commit ab2443c
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 10 deletions.
12 changes: 6 additions & 6 deletions fastchat/llm_judge/qa_browser.py
Original file line number Diff line number Diff line change
Expand Up @@ -405,12 +405,12 @@ def build_demo():
model_answers = load_model_answers(answer_dir)

# Load model judgments
model_judgments_normal_single = model_judgments_math_single = (
load_single_model_judgments(single_model_judgment_file)
)
model_judgments_normal_pairwise = model_judgments_math_pairwise = (
load_pairwise_model_judgments(pairwise_model_judgment_file)
)
model_judgments_normal_single = (
model_judgments_math_single
) = load_single_model_judgments(single_model_judgment_file)
model_judgments_normal_pairwise = (
model_judgments_math_pairwise
) = load_pairwise_model_judgments(pairwise_model_judgment_file)

demo = build_demo()
demo.queue(
Expand Down
6 changes: 3 additions & 3 deletions fastchat/model/model_adapter.py
Original file line number Diff line number Diff line change
Expand Up @@ -239,9 +239,9 @@ def load_model(
if num_gpus != 1:
kwargs["device_map"] = "auto"
if max_gpu_memory is None:
kwargs["device_map"] = (
"sequential" # This is important for not the same VRAM sizes
)
kwargs[
"device_map"
] = "sequential" # This is important for not the same VRAM sizes
available_gpu_memory = get_gpu_memory(num_gpus)
kwargs["max_memory"] = {
i: str(int(available_gpu_memory[i] * 0.85)) + "GiB"
Expand Down
4 changes: 3 additions & 1 deletion fastchat/serve/monitor/monitor.py
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,9 @@ def highlight_rank_max(s):
(
"color: green; font-weight: bold"
if v > 0
else "color: red; font-weight: bold" if v < 0 else ""
else "color: red; font-weight: bold"
if v < 0
else ""
)
for v in s
]
Expand Down

0 comments on commit ab2443c

Please sign in to comment.