Skip to content

Commit

Permalink
fix(model/utils.py): fix boolean value ambiguous error
Browse files Browse the repository at this point in the history
  • Loading branch information
huangting4201 committed Jan 22, 2024
1 parent c8b100e commit c606bb5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internlm/model/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -603,7 +603,7 @@ def backward(ctx, grad_output, *args):
if ctx.needs_input_grad[1]:
if grad_weight_sync:
grad_weight_sync.wait()
if grad_bias and grad_bias_sync:
if grad_bias is not None and grad_bias_sync is not None:
grad_bias_sync.wait()

return grad_input, grad_weight, grad_bias, None, None, None, None, None, None
Expand Down

0 comments on commit c606bb5

Please sign in to comment.