diff --git a/deepmd/pt/train/training.py b/deepmd/pt/train/training.py index a073b4868a..c5dbdfd9dd 100644 --- a/deepmd/pt/train/training.py +++ b/deepmd/pt/train/training.py @@ -1147,7 +1147,7 @@ def log_loss_valid(_task_key="Default"): log.info( f"The profiling trace has been saved under {self.tensorboard_log_dir}" ) - if self.profiling: + if not self.enable_profiler and self.profiling: prof.export_chrome_trace(self.profiling_file) log.info( f"The profiling trace has been saved to: {self.profiling_file}" diff --git a/deepmd/utils/argcheck.py b/deepmd/utils/argcheck.py index e4c15ebd21..e446674db7 100644 --- a/deepmd/utils/argcheck.py +++ b/deepmd/utils/argcheck.py @@ -3140,7 +3140,7 @@ def training_args( doc_disp_avg = ( "Display the average loss over the display interval for training sets." ) - doc_profiling = "Export the profiling results to the Chrome JSON file for performance analysis, driven by the legacy TensorFlow profiling API or PyTorch Profiler. The output file will be saved to `profiling_file`." + doc_profiling = "Export the profiling results to the Chrome JSON file for performance analysis, driven by the legacy TensorFlow profiling API or PyTorch Profiler. The output file will be saved to `profiling_file`. In the PyTorch backend, when enable_profiler is True, this option is ignored, since the profiling results will be saved to the TensorBoard log." doc_profiling_file = "Output file for profiling." doc_enable_profiler = "Export the profiling results to the TensorBoard log for performance analysis, driven by TensorFlow Profiler (available in TensorFlow 2.3) or PyTorch Profiler. The log will be saved to `tensorboard_log_dir`." doc_tensorboard = "Enable tensorboard"