accelerate
fcb01d16 - Fix MLflowTracker.store_init_configuration mutating the caller's config dict (#4046)

Commit
43 days ago
Fix MLflowTracker.store_init_configuration mutating the caller's config dict (#4046) * Fix MLflowTracker.store_init_configuration mutating the caller's config `store_init_configuration` deleted over-long values from the `values` dict in place via `del values[name]`. Since `Accelerator.init_trackers` passes the same `config` object to every tracker, this removed the key from the user's dict and from all other trackers as well. Build a filtered list of in-range items instead of mutating the input, matching the approach already used in `MLflowTracker.log`. The warning and the dropping of over-long values are preserved. Adds a regression test that fails before this change. * Apply style fixes --------- Co-authored-by: ATOM00blue <219721791+ATOM00blue@users.noreply.github.com> Co-authored-by: Marc Sun <57196510+SunMarc@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Author
Parents
Loading