File size: 810 Bytes
fd01725 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
# Copyright (c) Meta Platforms, Inc. and affiliates.
import os, sys
sys.path.append(os.path.dirname(os.path.realpath(__file__)))
from pathlib import Path
import logging
import pytorch_lightning # noqa: F401
formatter = logging.Formatter(
fmt="[%(asctime)s %(name)s %(levelname)s] %(message)s",
datefmt="%Y-%m-%d %H:%M:%S",
)
handler = logging.StreamHandler()
handler.setFormatter(formatter)
handler.setLevel(logging.INFO)
logger = logging.getLogger("mapper")
logger.setLevel(logging.INFO)
logger.addHandler(handler)
logger.propagate = False
pl_logger = logging.getLogger("pytorch_lightning")
if len(pl_logger.handlers):
pl_logger.handlers[0].setFormatter(formatter)
repo_dir = Path(__file__).parent.parent
EXPERIMENTS_PATH = repo_dir / "experiments/"
DATASETS_PATH = repo_dir / "datasets/"
|