mirror of
https://github.com/huggingface/lerobot.git
synced 2026-05-31 19:01:28 +00:00
Initialize logging in training script for both main and non-main processes
- Added `init_logging` calls to ensure proper logging setup when using the accelerator and in standard training mode. - This change enhances the clarity and consistency of logging during training sessions.
This commit is contained in:
@@ -439,6 +439,9 @@ if __name__ == "__main__":
|
||||
# We set step_scheduler_with_optimizer False to prevent accelerate from
|
||||
# adjusting the lr_scheduler steps based on the num_processes
|
||||
accelerator = accelerate.Accelerator(step_scheduler_with_optimizer=False)
|
||||
|
||||
init_logging(accelerator=accelerator)
|
||||
train(accelerator=accelerator)
|
||||
else:
|
||||
init_logging()
|
||||
train()
|
||||
|
||||
Reference in New Issue
Block a user