flake8 & isort (#5647)

This commit is contained in:
Jirka Borovec 2021-01-25 20:31:38 +01:00 committed by GitHub
parent 304f9c5bca
commit 7b30133a82
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 5 deletions

View File

@ -389,9 +389,11 @@ def get_gpu_memory_map() -> Dict[str, int]:
}
return gpu_memory_map
def get_formatted_model_size(total_model_size: float) -> float:
return f"{total_model_size:,.3f}"
def get_human_readable_count(number: int) -> str:
"""
Abbreviates an integer number with K, M, B, T for thousands, millions,

View File

@ -29,9 +29,8 @@ from pytorch_lightning.utilities.warning_utils import WarningCache
_WANDB_AVAILABLE = _module_available("wandb")
try:
from wandb.wandb_run import Run
import wandb
from wandb.wandb_run import Run
except ImportError:
# needed for test mocks, these tests shall be updated
wandb, Run = None, None

View File

@ -50,6 +50,7 @@ class PreCalculatedModel(BoringModel):
x = self.layer(x)
return self.layer1(x)
class UnorderedModel(LightningModule):
""" A model in which the layers not defined in order of execution """