Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
mednet
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
medai
software
mednet
Commits
ae970baa
Commit
ae970baa
authored
1 year ago
by
Daniel CARRON
Committed by
André Anjos
1 year ago
Browse files
Options
Downloads
Patches
Plain Diff
Added units to resources monitoring
parent
84c3a5f7
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!6
Making use of LightningDataModule and simplification of data loading
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/ptbench/utils/resources.py
+9
-9
9 additions, 9 deletions
src/ptbench/utils/resources.py
with
9 additions
and
9 deletions
src/ptbench/utils/resources.py
+
9
−
9
View file @
ae970baa
...
@@ -100,7 +100,7 @@ def gpu_constants():
...
@@ -100,7 +100,7 @@ def gpu_constants():
"""
"""
return
run_nvidia_smi
(
return
run_nvidia_smi
(
(
"
gpu_name
"
,
"
driver_version
"
,
"
memory.total
"
),
(
"
gpu_name
"
,
"
driver_version
"
,
"
memory.total
"
),
(
"
gpu_name
"
,
"
gpu_driver_version
"
,
"
gpu_memory_total
"
),
(
"
gpu_name
"
,
"
gpu_driver_version
"
,
"
gpu_memory_total
_GB
"
),
)
)
...
@@ -135,10 +135,10 @@ def gpu_log():
...
@@ -135,10 +135,10 @@ def gpu_log():
"
utilization.gpu
"
,
"
utilization.gpu
"
,
),
),
(
(
"
gpu_memory_total
"
,
"
gpu_memory_total
_GB
"
,
"
gpu_memory_used
"
,
"
gpu_memory_used
_GB
"
,
"
gpu_memory_free
"
,
"
gpu_memory_free
_percent
"
,
"
gpu_percent
"
,
"
gpu_
usage_
percent
"
,
),
),
)
)
...
@@ -165,7 +165,7 @@ def cpu_constants():
...
@@ -165,7 +165,7 @@ def cpu_constants():
1. ``cpu_count`` (:py:class:`int`): number of logical CPUs available
1. ``cpu_count`` (:py:class:`int`): number of logical CPUs available
"""
"""
return
(
return
(
(
"
cpu_memory_total
"
,
psutil
.
virtual_memory
().
total
/
GB
),
(
"
cpu_memory_total
_GB
"
,
psutil
.
virtual_memory
().
total
/
GB
),
(
"
cpu_count
"
,
psutil
.
cpu_count
(
logical
=
True
)),
(
"
cpu_count
"
,
psutil
.
cpu_count
(
logical
=
True
)),
)
)
...
@@ -245,9 +245,9 @@ class CPULogger:
...
@@ -245,9 +245,9 @@ class CPULogger:
# at this point, but ensures to update counts later on
# at this point, but ensures to update counts later on
gone
.
add
(
k
)
gone
.
add
(
k
)
return
(
return
(
(
"
cpu_memory_used
"
,
psutil
.
virtual_memory
().
used
/
GB
),
(
"
cpu_memory_used
_GB
"
,
psutil
.
virtual_memory
().
used
/
GB
),
(
"
cpu_rss
"
,
sum
([
k
.
rss
for
k
in
memory_info
])
/
GB
),
(
"
cpu_rss
_GB
"
,
sum
([
k
.
rss
for
k
in
memory_info
])
/
GB
),
(
"
cpu_vms
"
,
sum
([
k
.
vms
for
k
in
memory_info
])
/
GB
),
(
"
cpu_vms
_GB
"
,
sum
([
k
.
vms
for
k
in
memory_info
])
/
GB
),
(
"
cpu_percent
"
,
sum
(
cpu_percent
)),
(
"
cpu_percent
"
,
sum
(
cpu_percent
)),
(
"
cpu_processes
"
,
len
(
self
.
cluster
)
-
len
(
gone
)),
(
"
cpu_processes
"
,
len
(
self
.
cluster
)
-
len
(
gone
)),
(
"
cpu_open_files
"
,
sum
(
open_files
)),
(
"
cpu_open_files
"
,
sum
(
open_files
)),
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment