Skip to content

Commit cc7ca2f

Browse files
committed
Merge branch 'jhunt/fix-async-reset' of https://github.com/jjh42/pytorch-lightning into jhunt/fix-async-reset
2 parents 2af39e9 + d203eeb commit cc7ca2f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/lightning/pytorch/plugins/io/async_plugin.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
# limitations under the License.
1414

1515
from concurrent.futures import ThreadPoolExecutor
16-
from typing import Any, Optional, TYPE_CHECKING
16+
from typing import TYPE_CHECKING, Any, Optional
1717

1818
import torch
1919
from lightning_utilities.core.apply_func import apply_to_collection
@@ -81,7 +81,7 @@ def _save_checkpoint(*args: Any, **kwargs: Any) -> None:
8181
def teardown(self) -> None:
8282
"""This method is called to close the threads."""
8383
if self._executor is None:
84-
return None
84+
return
8585
self._executor.shutdown(wait=True)
8686
self._executor = None
8787

@@ -94,4 +94,4 @@ def teardown(self) -> None:
9494
def _clone_tensor(t: torch.Tensor) -> torch.Tensor:
9595
"""Clones a tensor on the caller thread."""
9696
# detach to avoid autograd history and clone to take a point-in-time copy
97-
return t.detach().clone()
97+
return t.detach().clone()

0 commit comments

Comments
 (0)