Skip to content

Commit

Permalink
fixed logger sample.
Browse files Browse the repository at this point in the history
  • Loading branch information
shibing624 committed Jun 20, 2023
1 parent 2232bdf commit 9e7c163
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion textgen/chatglm/chatglm_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,7 @@ def train_model(

# Training
logger.info("*** Train ***")
logger.debug(f"Train dataloader example: {list(trainer.get_train_dataloader())[0]}")
logger.debug(f"Train dataloader example: {next(iter(trainer.get_train_dataloader()))}")
(global_step, training_loss, metrics) = trainer.train(resume_from_checkpoint=resume_from_checkpoint)
self.results.update(metrics)
trainer.log_metrics("train", metrics)
Expand Down
2 changes: 1 addition & 1 deletion textgen/gpt/gpt_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -446,7 +446,7 @@ def train_model(

# Training
logger.info("*** Train ***")
logger.debug(f"Train dataloader example: {list(trainer.get_train_dataloader())[0]}")
logger.debug(f"Train dataloader example: {next(iter(trainer.get_train_dataloader()))}")
(global_step, training_loss, metrics) = trainer.train(resume_from_checkpoint=resume_from_checkpoint)
self.results.update(metrics)
trainer.log_metrics("train", metrics)
Expand Down

0 comments on commit 9e7c163

Please sign in to comment.