diff --git a/src/lightning/pytorch/core/optimizer.py b/src/lightning/pytorch/core/optimizer.py index 7cc58dfd14a69c..e0bcb797abf906 100644 --- a/src/lightning/pytorch/core/optimizer.py +++ b/src/lightning/pytorch/core/optimizer.py @@ -13,11 +13,11 @@ # limitations under the License. from contextlib import contextmanager from dataclasses import fields -from typing import Any, Callable, Dict, Generator, List, Optional, Tuple, Union, overload, DefaultDict +from typing import Any, Callable, DefaultDict, Dict, Generator, List, Optional, Tuple, Union, overload from weakref import proxy import torch -from torch import optim, Tensor +from torch import Tensor, optim from torch.optim import Optimizer from torch.optim.lr_scheduler import ReduceLROnPlateau from typing_extensions import override