-
Notifications
You must be signed in to change notification settings - Fork 4
[fix] Handle case with string response #155
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1075,7 +1075,12 @@ def derive_TPOT( | |
| output_sequence, reasoning_sequence = output_sequence_from_data( | ||
| data_bytes, join_chunks=False | ||
| ) | ||
| if isinstance(output_sequence, str): | ||
| output_sequence = [output_sequence] | ||
|
Comment on lines
+1078
to
+1079
|
||
| if not isinstance(output_sequence, list): | ||
| logging.warning( | ||
| f"Output sequence for sample {sample_uuid} is not a list but {type(output_sequence)}: {output_sequence}" | ||
| ) | ||
| continue | ||
arekay-nv marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| all_chunks = output_sequence | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The same string-wrapping logic should be applied to
reasoning_sequence. Whenoutput_sequence_from_datais called withjoin_chunks=Falseand the data dict contains a string"reasoning"value,reasoning_sequencewill also be a string. Theisinstance(reasoning_sequence, list)check on line 1085 will silently drop it, causing reasoning tokens to be excluded from the TPOT calculation. Add a similarisinstance(reasoning_sequence, str)check to wrap it in a list, consistent with the fix foroutput_sequence.