        logging_dir=os.path.join(config.output_dir, "logs"),
...     )
...     if accelerator.is_main_process:
...         if config.push_to_hub:
...             repo_name = get_full_repo_name(Path(config.output_dir).name)
...             repo = Repository(config.output_dir, clone_from=repo_name)
...         elif config.output_dir is not None:
...             os.makedirs(config.output_dir, exist_ok=True)
...         accelerator.init_trackers("t