Skip to content

Commit

Permalink
style: fix new ruff error
Browse files Browse the repository at this point in the history
  • Loading branch information
dacorvo committed Jun 28, 2024
1 parent 05791bd commit 0eba37f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion optimum/quanto/nn/qmodule.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ def _load_from_state_dict(
if assign_to_params_buffers:
self.weight = torch.nn.Parameter(deserialized_weight)
else:
if type(self.weight.data) != type(deserialized_weight):
if type(self.weight.data) is not type(deserialized_weight):
# Reloading frozen weights into unfrozen module: move to the correct device and force assignment
self.weight = torch.nn.Parameter(deserialized_weight.to(self.weight.device))
else:
Expand Down

0 comments on commit 0eba37f

Please sign in to comment.