[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
This commit is contained in:
parent
880fc3d175
commit
e7d04737dd
1 changed files with 8 additions and 1 deletions
|
|
@ -393,7 +393,14 @@ def grpo_trainer__generate_and_score_completions(function_name, function):
|
|||
|
||||
if match:
|
||||
indent = match.group(1)
|
||||
new_code = indent + "if not _was_training:\n" + indent + " self.model.for_inference()\n" + indent + "return output"
|
||||
new_code = (
|
||||
indent
|
||||
+ "if not _was_training:\n"
|
||||
+ indent
|
||||
+ " self.model.for_inference()\n"
|
||||
+ indent
|
||||
+ "return output"
|
||||
)
|
||||
function = function.replace(f"{indent}return output", new_code)
|
||||
|
||||
return function
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue