[bugfix] fix tool_call loss_scale#9266
Conversation
There was a problem hiding this comment.
Code Review
This pull request updates the _preprocess_function_call method in swift/template/base.py to ensure that loss and loss_scale fields are preserved when merging multiple tool_call messages into a single assistant message. The review feedback suggests refactoring the field preservation logic using a loop over keys to improve code extensibility and reduce repetition.
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request updates the documentation and implementation for handling 'loss' and 'loss_scale' fields in custom datasets. It clarifies that these fields apply to the assistant role and ensures that when consecutive 'tool_call' messages are merged, the 'loss' and 'loss_scale' configurations from the first message are preserved. I have no feedback to provide.
No description provided.