File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
src/lightning/pytorch/plugins/io Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 1313# limitations under the License.
1414
1515from concurrent .futures import ThreadPoolExecutor
16- from typing import Any , Optional , TYPE_CHECKING
16+ from typing import TYPE_CHECKING , Any , Optional
1717
1818import torch
1919from lightning_utilities .core .apply_func import apply_to_collection
@@ -78,7 +78,7 @@ def _save_checkpoint(*args: Any, **kwargs: Any) -> None:
7878 def teardown (self ) -> None :
7979 """This method is called to close the threads."""
8080 if self ._executor is None :
81- return None
81+ return
8282 self ._executor .shutdown (wait = True )
8383 self ._executor = None
8484
@@ -90,4 +90,4 @@ def teardown(self) -> None:
9090# snapshot the checkpoint payload on the caller thread to avoid races with parameter mutation
9191def _clone_tensor (t : torch .Tensor ) -> torch .Tensor :
9292 # detach to avoid autograd history and clone to take a point-in-time copy
93- return t .detach ().clone ()
93+ return t .detach ().clone ()
You can’t perform that action at this time.
0 commit comments