Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Dec 20, 2024
1 parent 4dd9e25 commit 933036d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/lightning/fabric/strategies/ddp.py
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,7 @@ def _create_stream_context(self, device_ids=None):
ctx = self.torch_lib.stream(stream)
else:
from contextlib import nullcontext

ctx = nullcontext()
return ctx

Expand Down
1 change: 1 addition & 0 deletions src/lightning/pytorch/strategies/ddp.py
Original file line number Diff line number Diff line change
Expand Up @@ -434,6 +434,7 @@ def _create_stream_context(self, device_ids=None):
ctx = self.torch_lib.stream(stream)
else:
from contextlib import nullcontext

ctx = nullcontext()
return ctx

Expand Down

0 comments on commit 933036d

Please sign in to comment.