Skip to content

Commit

Permalink
updated with pull requests, fixed logging
Browse files Browse the repository at this point in the history
  • Loading branch information
gorkemgoknar committed Dec 21, 2020
1 parent 21c90f1 commit af3bab1
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
Binary file modified __pycache__/utils.cpython-36.pyc
Binary file not shown.
1 change: 1 addition & 0 deletions train.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,7 @@ def train():

# logging is set to INFO (resp. WARN) for main (resp. auxiliary) process. logger.info => log main process only, logger.warning => log all processes
logging.basicConfig(level=logging.INFO if args.local_rank in [-1, 0] else logging.WARN)

logger.warning("Running process %d", args.local_rank) # This is a logger.warning: it will be printed by all distributed processes
logger.info("Arguments: %s", pformat(args))

Expand Down
6 changes: 3 additions & 3 deletions utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@
HF_FINETUNED_MODEL = "https://s3.amazonaws.com/models.huggingface.co/transfer-learning-chatbot/gpt_personachat_cache.tar.gz"

logger = logging.getLogger(__file__)
logger.setLevel(level=logging.DEBUG)
mp.log_to_stderr(level=logging.DEBUG)
logger.setLevel(level=logging.INFO)
mp.log_to_stderr(level=logging.INFO)
mp_logger = mp.get_logger()
mp_logger.setLevel(level=logging.DEBUG)
mp_logger.setLevel(level=logging.INFO)


def download_pretrained_model():
Expand Down

0 comments on commit af3bab1

Please sign in to comment.