Skip to content

Commit 86ae5e2

Browse files
committed
Make model name matching case insensitive
The real data isn't consistent in how model_hf_repo is cased. Most entries use mixed case, but some are all lowercase. The BLIS data used lowercase, while the model names in the model catalog were created directly from the real data, preserving their mixed or lowercase formats. Because the code was doing an exact, case-sensitive match, some of the BLIS results weren’t being recognized. I updated the comparison to be case-insensitive, and everything works now. I also converted all the model names in the model catalog to be lower case to be consistent. Signed-off-by: Andre Fredette <afredette@redhat.com>
1 parent 39a5420 commit 86ae5e2

File tree

2 files changed

+615
-171
lines changed

2 files changed

+615
-171
lines changed

backend/src/recommendation/capacity_planner.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,9 +92,9 @@ def plan_capacity(
9292
)
9393
return None
9494

95-
# Filter to only this model
95+
# Filter to only this model (case-insensitive match)
9696
model_configs = [
97-
bench for bench in matching_configs if bench.model_hf_repo == model.model_id
97+
bench for bench in matching_configs if bench.model_hf_repo.lower() == model.model_id.lower()
9898
]
9999

100100
if not model_configs:

0 commit comments

Comments
 (0)