Skip to content

Commit

Permalink
Adding rank zero decorator to patched_fit method - to log model only …
Browse files Browse the repository at this point in the history
…once in multi gpu environment

Signed-off-by: Shrinath Suresh <[email protected]>
  • Loading branch information
shrinath-suresh committed May 9, 2022
1 parent c577c7f commit 97ca87e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions mlflow/pytorch/_pytorch_autolog.py
Original file line number Diff line number Diff line change
Expand Up @@ -325,6 +325,7 @@ def _log_early_stop_metrics(early_stop_callback, client, run_id):
client.log_metrics(run_id, metrics)


@rank_zero_only
def patched_fit(original, self, *args, **kwargs):
"""
A patched implementation of `pytorch_lightning.Trainer.fit` which enables logging the
Expand Down

0 comments on commit 97ca87e

Please sign in to comment.