Add lightning apps to info_packages of collect_env_details (#13815)

This commit is contained in:
Luca Medeiros 2022-07-27 01:04:36 +09:00 committed by GitHub
parent faf7ff57c0
commit 0cbfe08a41
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 11 additions and 0 deletions

View File

@ -27,6 +27,15 @@ import tqdm
sys.path += [os.path.abspath(".."), os.path.abspath("")]
import pytorch_lightning # noqa: E402
try:
import lightning
except ModuleNotFoundError:
pass
try:
import lightning_app
except ModuleNotFoundError:
pass
LEVEL_OFFSET = "\t"
KEY_PADDING = 20
@ -56,6 +65,8 @@ def info_packages():
"pyTorch_version": torch.__version__,
"pyTorch_debug": torch.version.debug,
"pytorch-lightning": pytorch_lightning.__version__,
"lightning": lightning.__version__ if "lightning" in sys.modules else None,
"lightning_app": lightning_app.__version__ if "lightning_app" in sys.modules else None,
"tqdm": tqdm.__version__,
}