make init_trackers to launch on main process#642
Conversation
|
The documentation is not available anymore as the PR was closed or merged. |
muellerzr
left a comment
There was a problem hiding this comment.
Thanks! For right now I think this is fine, and if folks don't like it we can revert back or make it optional to do so. There may be situations when spinning up a tracker on all the processes could be useful (and then manually logging them instead), so we'll keep an eye out for this on feedback
|
@Gladiator07 could you adjust the following code in the examples as well? Since this removes the need for the check: https://github.com/huggingface/accelerate/blob/main/examples/by_feature/tracking.py#L168-L172 |
|
@muellerzr adjust as in? Should I remove the |
|
@Gladiator07 correct. We're putting this in place so that is no longer needed, so the examples should show this :) |
|
Cool, doing this in a separate PR. |
While on distributed setup the
accelerator.init_trackers()method initializes multiple runs of the tracker on all processes. It should be initialized on the main process. Added a@on_main_processdecorator to achieve the expected behavior.@muellerzr @sgugger