"git@developer.sourcefind.cn:chenpangpang/transformers.git" did not exist on "27c79a0fb4da6aa0fe27b112822a660f562b3a11"
Unverified Commit f84226b7 authored by harshithapv's avatar harshithapv Committed by GitHub
Browse files

Log Azure ML metrics only for rank 0 (#12766)

* minor change to log azureml only for rank 0

* fix typo
parent 5c673efa
......@@ -600,7 +600,7 @@ class AzureMLCallback(TrainerCallback):
self.azureml_run = Run.get_context()
def on_log(self, args, state, control, logs=None, **kwargs):
if self.azureml_run:
if self.azureml_run and state.is_world_process_zero:
for k, v in logs.items():
if isinstance(v, (int, float)):
self.azureml_run.log(k, v, description=k)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment