Skip to content

Commit

Permalink
Reduce diff
Browse files Browse the repository at this point in the history
  • Loading branch information
mryab committed Sep 10, 2022
1 parent 4c0fef6 commit f311943
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 1 addition & 3 deletions hivemind/moe/server/module_backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,9 +118,7 @@ def backward(self, *inputs: torch.Tensor) -> Tuple[torch.Tensor, ...]:

with torch.enable_grad():
args = [
tensor.detach().requires_grad_(True)
if tensor.dtype in (torch.half, torch.float, torch.double)
else tensor.detach()
tensor.detach().requires_grad_(True) if tensor.is_floating_point() else tensor.detach()
for tensor in args
]
kwargs = {
Expand Down
2 changes: 1 addition & 1 deletion tests/test_cli_scripts.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def test_dht_connection_successful():
encoding="utf-8",
)

# skip two lines with connectivity info
# skip first two lines with connectivity info
for _ in range(2):
dht_client_proc.stderr.readline()
first_report_msg = dht_client_proc.stderr.readline()
Expand Down

0 comments on commit f311943

Please sign in to comment.