2020-02-01 23:24:56 +00:00
|
|
|
"""Root package info."""
|
2019-10-28 22:41:13 +00:00
|
|
|
|
2021-03-02 09:47:55 +00:00
|
|
|
import logging
|
2021-01-12 12:56:20 +00:00
|
|
|
import os
|
|
|
|
|
2021-04-09 14:36:06 +00:00
|
|
|
from pytorch_lightning.__info__ import ( # noqa: F401
|
2021-03-22 12:39:19 +00:00
|
|
|
__author__,
|
|
|
|
__author_email__,
|
|
|
|
__copyright__,
|
|
|
|
__docs__,
|
|
|
|
__homepage__,
|
|
|
|
__license__,
|
|
|
|
__version__,
|
2020-07-24 15:42:15 +00:00
|
|
|
)
|
2020-04-20 21:36:26 +00:00
|
|
|
|
2021-03-02 09:47:55 +00:00
|
|
|
_root_logger = logging.getLogger()
|
|
|
|
_logger = logging.getLogger(__name__)
|
|
|
|
_logger.setLevel(logging.INFO)
|
2019-10-28 22:41:13 +00:00
|
|
|
|
2021-03-02 09:47:55 +00:00
|
|
|
# if root logger has handlers, propagate messages up and let root logger process them
|
|
|
|
if not _root_logger.hasHandlers():
|
|
|
|
_logger.addHandler(logging.StreamHandler())
|
|
|
|
_logger.propagate = False
|
2020-03-20 19:49:01 +00:00
|
|
|
|
2020-12-23 23:11:42 +00:00
|
|
|
_PACKAGE_ROOT = os.path.dirname(__file__)
|
|
|
|
_PROJECT_ROOT = os.path.dirname(_PACKAGE_ROOT)
|
2020-12-01 21:58:32 +00:00
|
|
|
|
2021-03-22 12:39:19 +00:00
|
|
|
from pytorch_lightning import metrics # noqa: E402
|
|
|
|
from pytorch_lightning.callbacks import Callback # noqa: E402
|
|
|
|
from pytorch_lightning.core import LightningDataModule, LightningModule # noqa: E402
|
|
|
|
from pytorch_lightning.trainer import Trainer # noqa: E402
|
|
|
|
from pytorch_lightning.utilities.seed import seed_everything # noqa: E402
|
|
|
|
|
|
|
|
__all__ = [
|
|
|
|
'Trainer',
|
|
|
|
'LightningDataModule',
|
|
|
|
'LightningModule',
|
|
|
|
'Callback',
|
|
|
|
'seed_everything',
|
|
|
|
'metrics',
|
|
|
|
]
|
2020-04-21 11:12:02 +00:00
|
|
|
|
|
|
|
# for compatibility with namespace packages
|
|
|
|
__import__('pkg_resources').declare_namespace(__name__)
|