mirror of
https://github.com/huggingface/lerobot.git
synced 2026-07-23 01:41:54 +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
|
# We set step_scheduler_with_optimizer False to prevent accelerate from
|
||||||
# adjusting the lr_scheduler steps based on the num_processes
|
# adjusting the lr_scheduler steps based on the num_processes
|
||||||
accelerator = accelerate.Accelerator(step_scheduler_with_optimizer=False)
|
accelerator = accelerate.Accelerator(step_scheduler_with_optimizer=False)
|
||||||
|
|
||||||
|
init_logging(accelerator=accelerator)
|
||||||
train(accelerator=accelerator)
|
train(accelerator=accelerator)
|
||||||
else:
|
else:
|
||||||
|
init_logging()
|
||||||
train()
|
train()
|
||||||
|
|||||||
Reference in New Issue
Block a user