Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Jul 28, 2021
1 parent c4ace84 commit f664973
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions pytorch_lightning/core/lightning.py
Original file line number Diff line number Diff line change
Expand Up @@ -1963,8 +1963,8 @@ def model_size(self) -> float:
Will be removed in v1.7.0
"""
rank_zero_deprecation(
'The `LightningModule.model_size` property was deprecated in v1.5 and will be removed in v1.7. Please '
'use the get_model_size method under utilities/model_helpers.py'
"The `LightningModule.model_size` property was deprecated in v1.5 and will be removed in v1.7. Please "
"use the get_model_size method under utilities/model_helpers.py"
)

tmp_name = f"{uuid.uuid4().hex}.pt"
Expand Down
2 changes: 1 addition & 1 deletion pytorch_lightning/utilities/memory.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
# limitations under the License.

import gc
import uuid
import os
import uuid

import torch
from torch.nn import Module
Expand Down
2 changes: 1 addition & 1 deletion tests/callbacks/test_quantization.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
from pytorch_lightning import seed_everything, Trainer
from pytorch_lightning.callbacks import QuantizationAwareTraining
from pytorch_lightning.metrics.functional.mean_relative_error import mean_relative_error
from pytorch_lightning.utilities.memory import get_model_size_mb
from pytorch_lightning.utilities.exceptions import MisconfigurationException
from pytorch_lightning.utilities.memory import get_model_size_mb
from tests.helpers.datamodules import RegressDataModule
from tests.helpers.runif import RunIf
from tests.helpers.simple_models import RegressionModel
Expand Down
2 changes: 1 addition & 1 deletion tests/utilities/test_memory.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
# See the License for the specific language governing permissions and
# limitations under the License.
import torch
import torch.nn as nn

from pytorch_lightning.utilities.memory import get_model_size_mb, recursive_detach
from tests.helpers import BoringModel
import torch.nn as nn


def test_recursive_detach():
Expand Down

0 comments on commit f664973

Please sign in to comment.