Skip to content

Commit 0c12314

Browse files
move uss&pss_msg to benchmark_flag branch
1 parent 1f585ae commit 0c12314

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

ppsci/solver/printer.py

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -90,14 +90,12 @@ def log_train_info(
9090
)
9191
log_str += f", {max_mem_reserved_msg}, {max_mem_allocated_msg}"
9292

93-
# CPU memory
94-
_process = psutil.Process()
95-
_mem_full = _process.memory_full_info()
96-
uss_msg = (
97-
f"USS: {_mem_full.uss // (1 << 20)} MB" # Unique Set Size (USS) memory in MB
98-
)
99-
pss_msg = f"PSS: {_mem_full.pss // (1 << 20)} MB" # Proportional Set Size (PSS) memory in MB
100-
log_str += f", {uss_msg}, {pss_msg}"
93+
# CPU memory
94+
_process = psutil.Process()
95+
_mem_full = _process.memory_full_info()
96+
uss_msg = f"USS: {_mem_full.uss // (1 << 20)} MB" # Unique Set Size (USS) memory in MB
97+
pss_msg = f"PSS: {_mem_full.pss // (1 << 20)} MB" # Proportional Set Size (PSS) memory in MB
98+
log_str += f", {uss_msg}, {pss_msg}"
10199
logger.info(log_str)
102100

103101
# reset time information after printing

0 commit comments

Comments
 (0)