<reponame>eungbean/DCGAN-pytorch-lightning-comet<gh_stars>0
from pytorch_lightning.loggers.comet import CometLogger
import logging

level = logging.INFO
logging.basicConfig(level=level, format="%(asctime)s - [%(levelname)s] - %(message)s")


def get_comet_logger(_C):

    comet_logger = CometLogger(
        disabled=_C.COMET.DISABLED,
        api_key=_C.COMET.APIKEY,
        workspace=_C.COMET.WORKSPACE,
        project_name=_C.COMET.PROJECT_NAME,
        experiment_name=_C.EXP_TITLE,
        save_dir=str(_C.OUTPUT.LOG_DIR),
        log_code=_C.COMET.LOG_CODE,
        log_graph=_C.COMET.LOG_GRAPH,
        auto_weight_logging=_C.COMET.AUTO_LOG_WEIGHT,
        auto_param_logging=_C.COMET.AUTO_LOG_PARAM,
        auto_metric_logging=_C.COMET.AUTO_LOG_METRIC,
        auto_output_logging=_C.COMET.AUTO_LOG_OUTPUT,
        # rest_api_key=os.environ["COMET_REST_KEY"], # Optional
    )
    return comet_logger

from pytorch_lightning.loggers.comet import CometLogger
import logging

level = logging.INFO
logging.basicConfig(level=level, format="%(asctime)s - [%(levelname)s] - %(message)s")


def get_comet_logger(_C):

    comet_logger = CometLogger(
        disabled=_C.COMET.DISABLED,
        api_key=_C.COMET.APIKEY,
        workspace=_C.COMET.WORKSPACE,
        project_name=_C.COMET.PROJECT_NAME,
        experiment_name=_C.EXP_TITLE,
        save_dir=str(_C.OUTPUT.LOG_DIR),
        log_code=_C.COMET.LOG_CODE,
        log_graph=_C.COMET.LOG_GRAPH,
        auto_weight_logging=_C.COMET.AUTO_LOG_WEIGHT,
        auto_param_logging=_C.COMET.AUTO_LOG_PARAM,
        auto_metric_logging=_C.COMET.AUTO_LOG_METRIC,
        auto_output_logging=_C.COMET.AUTO_LOG_OUTPUT,
        # rest_api_key=os.environ["COMET_REST_KEY"], # Optional
    )
    return comet_logger
# rest_api_key=os.environ["COMET_REST_KEY"], # Optional