def set_logger(log_path):
    'Set the logger to log info in terminal and file `log_path`.\n\n  In general, it is useful to have a logger so that every output to the terminal is saved\n  in a permanent file. Here we save it to `model_dir/train.log`.\n\n  Example:\n  ```\n  logging.info("Starting training...")\n  ```\n\n  Args:\n      log_path: (string) where to log\n  '
    logger = logging.getLogger()
    logger.setLevel(logging.INFO)
    if (not logger.handlers):
        file_handler = logging.FileHandler(log_path)
        file_handler.setFormatter(logging.Formatter('%(asctime)s:%(levelname)s: %(message)s'))
        logger.addHandler(file_handler)
        stream_handler = logging.StreamHandler()
        stream_handler.setFormatter(logging.Formatter('%(message)s'))
        logger.addHandler(stream_handler)
Set the logger to log info in terminal and file `log_path`.

In general, it is useful to have a logger so that every output to the terminal is saved
in a permanent file. Here we save it to `model_dir/train.log`.

Example:
```
logging.info("Starting training...")
```

Args:
    log_path: (string) where to log
def set_logger(log_path):
    'Set the logger to log info in terminal and file `log_path`.\n\n  In general, it is useful to have a logger so that every output to the terminal is saved\n  in a permanent file. Here we save it to `model_dir/train.log`.\n\n  Example:\n  ```\n  logging.info("Starting training...")\n  ```\n\n  Args:\n      log_path: (string) where to log\n  '
    logger = logging.getLogger()
    logger.setLevel(logging.INFO)
    if (not logger.handlers):
        file_handler = logging.FileHandler(log_path)
        file_handler.setFormatter(logging.Formatter('%(asctime)s:%(levelname)s: %(message)s'))
        logger.addHandler(file_handler)
        stream_handler = logging.StreamHandler()
        stream_handler.setFormatter(logging.Formatter('%(message)s'))
        logger.addHandler(stream_handler)