parent
ae1fd6a201
commit
9ed6783357
|
@ -20,9 +20,9 @@ from typing import Any, List, Mapping, Optional, Sequence, Tuple, Union
|
|||
from torch.utils.data import DataLoader, Dataset, IterableDataset
|
||||
|
||||
from pytorch_lightning.core.hooks import CheckpointHooks, DataHooks
|
||||
from pytorch_lightning.core.mixins import HyperparametersMixin
|
||||
from pytorch_lightning.utilities import rank_zero_deprecation
|
||||
from pytorch_lightning.utilities.argparse import add_argparse_args, from_argparse_args, get_init_arguments_and_types
|
||||
from pytorch_lightning.utilities.hparams_mixin import HyperparametersMixin
|
||||
|
||||
|
||||
class LightningDataModule(CheckpointHooks, DataHooks, HyperparametersMixin):
|
||||
|
|
|
@ -34,16 +34,15 @@ from torchmetrics import Metric
|
|||
from pytorch_lightning.core.grads import GradInformation
|
||||
from pytorch_lightning.core.hooks import CheckpointHooks, DataHooks, ModelHooks
|
||||
from pytorch_lightning.core.memory import ModelSummary
|
||||
from pytorch_lightning.core.mixins import DeviceDtypeModuleMixin, HyperparametersMixin
|
||||
from pytorch_lightning.core.optimizer import LightningOptimizer
|
||||
from pytorch_lightning.core.saving import ModelIO
|
||||
from pytorch_lightning.trainer.connectors.logger_connector.fx_validator import FxValidator
|
||||
from pytorch_lightning.utilities import rank_zero_deprecation, rank_zero_warn
|
||||
from pytorch_lightning.utilities.apply_func import apply_to_collection, convert_to_tensors
|
||||
from pytorch_lightning.utilities.cloud_io import get_filesystem
|
||||
from pytorch_lightning.utilities.device_dtype_mixin import DeviceDtypeModuleMixin
|
||||
from pytorch_lightning.utilities.distributed import distributed_available, sync_ddp
|
||||
from pytorch_lightning.utilities.exceptions import MisconfigurationException
|
||||
from pytorch_lightning.utilities.hparams_mixin import HyperparametersMixin
|
||||
from pytorch_lightning.utilities.parsing import collect_init_args
|
||||
from pytorch_lightning.utilities.signature_utils import is_param_in_hook_signature
|
||||
from pytorch_lightning.utilities.types import _METRIC_COLLECTION, EPOCH_OUTPUT, STEP_OUTPUT
|
||||
|
|
|
@ -0,0 +1,16 @@
|
|||
# Copyright The PyTorch Lightning team.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# 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 pytorch_lightning.core.mixins.device_dtype_mixin import DeviceDtypeModuleMixin # noqa F401
|
||||
from pytorch_lightning.core.mixins.hparams_mixin import HyperparametersMixin # noqa F401
|
|
@ -18,7 +18,7 @@ from torch.nn import DataParallel
|
|||
from torch.nn.parallel import DistributedDataParallel
|
||||
|
||||
import pytorch_lightning as pl
|
||||
from pytorch_lightning.utilities.device_dtype_mixin import DeviceDtypeModuleMixin
|
||||
from pytorch_lightning.core.mixins import DeviceDtypeModuleMixin
|
||||
|
||||
|
||||
class _LightningPrecisionModuleWrapperBase(DeviceDtypeModuleMixin, torch.nn.Module):
|
||||
|
|
|
@ -19,10 +19,10 @@ from typing import Any, Callable, Dict, List, Mapping, Optional, Tuple, Union
|
|||
import torch
|
||||
from torchmetrics import Metric
|
||||
|
||||
from pytorch_lightning.core.mixins import DeviceDtypeModuleMixin
|
||||
from pytorch_lightning.utilities import rank_zero_warn
|
||||
from pytorch_lightning.utilities.apply_func import apply_to_collection, apply_to_collections
|
||||
from pytorch_lightning.utilities.data import extract_batch_size
|
||||
from pytorch_lightning.utilities.device_dtype_mixin import DeviceDtypeModuleMixin
|
||||
from pytorch_lightning.utilities.distributed import distributed_available
|
||||
from pytorch_lightning.utilities.enums import LightningEnum
|
||||
from pytorch_lightning.utilities.exceptions import MisconfigurationException
|
||||
|
|
|
@ -16,7 +16,7 @@ import torch
|
|||
import torch.nn as nn
|
||||
|
||||
from pytorch_lightning import Callback, Trainer
|
||||
from pytorch_lightning.utilities.device_dtype_mixin import DeviceDtypeModuleMixin
|
||||
from pytorch_lightning.core.mixins import DeviceDtypeModuleMixin
|
||||
from tests.helpers import BoringModel
|
||||
from tests.helpers.runif import RunIf
|
||||
|
||||
|
|
Loading…
Reference in New Issue