diff --git a/mmf/trainers/core/profiling.py b/mmf/trainers/core/profiling.py index ff8d03d17..80d343719 100644 --- a/mmf/trainers/core/profiling.py +++ b/mmf/trainers/core/profiling.py @@ -1,6 +1,7 @@ # Copyright (c) Facebook, Inc. and its affiliates. import logging +import threading from abc import ABC from typing import Type @@ -16,5 +17,7 @@ class TrainerProfilingMixin(ABC): def profile(self, text: str) -> None: if self.training_config.logger_level != "debug": return - logging.debug(f"{text}: {self.profiler.get_time_since_start()}") + logging.debug( + f"tid={threading.current_thread().ident}, {text}: {self.profiler.get_time_since_start()}" + ) self.profiler.reset()