Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
OpenDAS
vllm_cscc
Commits
ad7f714d
Unverified
Commit
ad7f714d
authored
Nov 29, 2025
by
Chukwuma Nwaugha
Committed by
GitHub
Nov 29, 2025
Browse files
hfrunner.classify should return list[list[float]] not list[str] (#29671)
Signed-off-by:
Chukwuma Nwaugha
<
nwaughac@gmail.com
>
parent
f4341f45
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
tests/conftest.py
tests/conftest.py
+5
-2
No files found.
tests/conftest.py
View file @
ad7f714d
...
...
@@ -459,14 +459,17 @@ class HfRunner:
embeddings
.
append
(
embedding
)
return
embeddings
def
classify
(
self
,
prompts
:
list
[
str
])
->
list
[
str
]:
def
classify
(
self
,
prompts
:
list
[
str
])
->
list
[
list
[
float
]
]:
# output is final logits
all_inputs
=
self
.
get_inputs
(
prompts
)
outputs
=
[]
outputs
:
list
[
list
[
float
]]
=
[]
problem_type
=
getattr
(
self
.
config
,
"problem_type"
,
""
)
for
inputs
in
all_inputs
:
output
=
self
.
model
(
**
self
.
wrap_device
(
inputs
))
assert
isinstance
(
output
.
logits
,
torch
.
Tensor
)
if
problem_type
==
"regression"
:
logits
=
output
.
logits
[
0
].
tolist
()
elif
problem_type
==
"multi_label_classification"
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment