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): ...@@ -600,7 +600,7 @@ class AzureMLCallback(TrainerCallback):
self.azureml_run = Run.get_context() self.azureml_run = Run.get_context()
def on_log(self, args, state, control, logs=None, **kwargs): 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(): for k, v in logs.items():
if isinstance(v, (int, float)): if isinstance(v, (int, float)):
self.azureml_run.log(k, v, description=k) 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