Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions deepmd/pt/train/training.py
Original file line number Diff line number Diff line change
Expand Up @@ -658,7 +658,7 @@
writer = SummaryWriter(log_dir=self.tensorboard_log_dir)
if self.enable_profiler or self.profiling:
prof = torch.profiler.profile(
schedule=torch.profiler.schedule(wait=1, warmup=1, active=3, repeat=1),
schedule=torch.profiler.schedule(wait=1, warmup=15, active=3, repeat=1),
Comment thread
caic99 marked this conversation as resolved.
on_trace_ready=torch.profiler.tensorboard_trace_handler(
self.tensorboard_log_dir
)
Expand Down Expand Up @@ -1032,10 +1032,14 @@
writer.close()
if self.enable_profiler or self.profiling:
prof.stop()
if self.enable_profiler:

Check warning on line 1035 in deepmd/pt/train/training.py

View check run for this annotation

Codecov / codecov/patch

deepmd/pt/train/training.py#L1035

Added line #L1035 was not covered by tests
log.info(
f"The profiling trace has been saved under {self.tensorboard_log_dir}"
)

Check warning on line 1038 in deepmd/pt/train/training.py

View check run for this annotation

Codecov / codecov/patch

deepmd/pt/train/training.py#L1038

Added line #L1038 was not covered by tests
if self.profiling:
prof.export_chrome_trace(self.profiling_file)
log.info(
f"The profiling trace have been saved to: {self.profiling_file}"
f"The profiling trace has been saved to: {self.profiling_file}"
)

def save_model(self, save_path, lr=0.0, step=0) -> None:
Expand Down