aboutsummaryrefslogtreecommitdiffstats
path: root/Common/nvidia.py
diff options
context:
space:
mode:
authorVolker Hoffmann <volker@cheleb.net>2016-11-01 10:16:52 +0100
committerVolker Hoffmann <volker@cheleb.net>2016-11-01 10:16:52 +0100
commit7fe62738902de67ef9b2698a5e3d55eef5441f46 (patch)
tree68081f37c3f7aafcae515a93cff1742dd869f46b /Common/nvidia.py
parente41d81ff279691756151384c8e296257dc9372ab (diff)
fix: "type" is a built-in function, silly
Diffstat (limited to 'Common/nvidia.py')
-rw-r--r--Common/nvidia.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/Common/nvidia.py b/Common/nvidia.py
index e7d6188..6df684b 100644
--- a/Common/nvidia.py
+++ b/Common/nvidia.py
@@ -7,7 +7,7 @@ import numpy as np
import glob as glob
-def read_gpu_stats(node='vesta1', type='tesla'):
+def read_gpu_stats(node='vesta1', gpu_type='tesla'):
"""
Reads stats from CSV file, which was dumped on the GPU nodes.
@@ -23,7 +23,7 @@ def read_gpu_stats(node='vesta1', type='tesla'):
For example, "vesta1_1454748497.csv".
@param: node - GPU node, used to nconstruct filename [String]
- @param: type - GPU Type (Tesla|GTX) [String]
+ @param: gpu_type - GPU Type (Tesla|GTX) [String]
@return: df - GPU Stats [Pandas Dataframe]
@return: epoch - Time (Seconds since 01-01-1970) [Integer]
@return: success - Did we get data? [Boolean]
@@ -50,7 +50,7 @@ def read_gpu_stats(node='vesta1', type='tesla'):
# Branch on GPU Type. See header documentation.
# Tesla cards report all stats. GTX cards are gimped.
- if type == 'tesla':
+ if gpu_type == 'tesla':
names_cols = [ 'gpu_id', 'uuid', \
'gpu_name', \
'gpu_temperature', \
@@ -83,7 +83,7 @@ def read_gpu_stats(node='vesta1', type='tesla'):
# Add Node Column
df['node'] = pd.Series(["%s" % node]*len(df))
- elif type == 'gtx':
+ elif gpu_type == 'gtx':
names_cols = [ 'gpu_id', 'uuid', \
'gpu_name', \
'gpu_temperature' ]