Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions src/lightning_app/utilities/apply_func.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,8 @@

import dataclasses
from collections import defaultdict, OrderedDict
from collections.abc import Mapping, Sequence
from copy import deepcopy
from typing import Any, Callable, Optional, Tuple, Union
from typing import Any, Callable, Mapping, Optional, Sequence, Tuple, Union

from lightning_app.utilities.exceptions import MisconfigurationException

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,9 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
from collections.abc import Generator
from dataclasses import asdict, dataclass, replace
from functools import partial, wraps
from typing import Any, Callable, cast, Dict, List, Optional, Tuple, Union
from typing import Any, Callable, cast, Dict, Generator, List, Optional, Tuple, Union

import torch
from torch import Tensor
Expand Down
3 changes: 1 addition & 2 deletions src/pytorch_lightning/trainer/supporters.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.

from collections.abc import Iterable, Iterator, Mapping, Sequence
from dataclasses import asdict, dataclass, field
from typing import Any, Callable, Dict, List, Optional, Union
from typing import Any, Callable, Dict, Iterable, Iterator, List, Mapping, Optional, Sequence, Union

import torch
from torch.utils.data import Dataset
Expand Down
3 changes: 1 addition & 2 deletions src/pytorch_lightning/utilities/apply_func.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,9 @@
import operator
from abc import ABC
from collections import defaultdict, OrderedDict
from collections.abc import Mapping, Sequence
from copy import copy, deepcopy
from functools import partial
from typing import Any, Callable, List, Optional, Tuple, Union
from typing import Any, Callable, List, Mapping, Optional, Sequence, Tuple, Union

import numpy as np
import torch
Expand Down
3 changes: 1 addition & 2 deletions src/pytorch_lightning/utilities/fetching.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,8 @@
# limitations under the License.

from abc import ABC, abstractmethod
from collections.abc import Iterable, Iterator
from copy import deepcopy
from typing import Any, Callable, List, Optional, Sized, Tuple
from typing import Any, Callable, Iterable, Iterator, List, Optional, Sized, Tuple

import torch
from torch.utils.data.dataloader import DataLoader
Expand Down
2 changes: 1 addition & 1 deletion tests/tests_pytorch/overrides/test_distributed.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
from collections.abc import Iterable
from typing import Iterable

import pytest
from torch.utils.data import BatchSampler, SequentialSampler
Expand Down
3 changes: 1 addition & 2 deletions tests/tests_pytorch/utilities/test_auto_restart.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,10 @@
import random
import random as python_random
from collections import defaultdict
from collections.abc import Iterable
from contextlib import suppress
from copy import deepcopy
from dataclasses import asdict
from typing import Iterator, List, Optional
from typing import Iterable, Iterator, List, Optional
from unittest import mock
from unittest.mock import ANY

Expand Down