use state for wandb in callbacks (#2930) [skip ci]

This commit is contained in:
Wing Lian
2025-07-17 15:31:56 -04:00
committed by GitHub
parent 8e41317250
commit d23f972602

View File

@@ -798,7 +798,7 @@ class SaveAxolotlConfigtoWandBCallback(TrainerCallback):
control: TrainerControl,
**kwargs, # pylint: disable=unused-argument
):
if is_main_process():
if state.is_world_process_zero:
try:
# sync config to top level in run, cannot delete file right away because wandb schedules it to be synced even w/policy = 'now', so let OS delete it later.
with NamedTemporaryFile(