watchme.watchers.gpu package¶
Submodules¶
watchme.watchers.gpu.decorators module¶
Copyright (C) 2019 Vanessa Sochat.
This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
-
watchme.watchers.gpu.decorators.
monitor_gpu
(*args, **kwargs)[source]¶ a decorator to monitor a function every 3 (or user specified) seconds. We include one or more task names that include data we want to extract. we get the pid of the running function, and then use the gpu_task from gpu to watch it. The functools “wraps” ensures that the (fargs, fkwargs) are passed from the calling function despite the wrapper. The following parameters can be provided to “monitor resources”
- Parameters
watcher (the watcher instance to use, used to save data to a “task”) – folder that starts with “decorator-<name<”
seconds (how often to collect data during the run.)
only (ignore skip and include, only include this custom subset)
skip (Fields in the result to skip (list).)
include (Fields in the result to include back in (list).)
create (whether to create the watcher on the fly (default False, must) – exist)
name (the suffix of the decorator-gpu-<name> folder. If not provided,) – defaults to the function name
watchme.watchers.gpu.pynvml module¶
Copyright (C) 2019 Vanessa Sochat.
This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
The original license (2011-2015) is included below.
-
exception
watchme.watchers.gpu.pynvml.
NVMLError_AlreadyInitialized
¶
-
exception
watchme.watchers.gpu.pynvml.
NVMLError_CorruptedInforom
¶
-
exception
watchme.watchers.gpu.pynvml.
NVMLError_DriverNotLoaded
¶
-
exception
watchme.watchers.gpu.pynvml.
NVMLError_FunctionNotFound
¶
-
exception
watchme.watchers.gpu.pynvml.
NVMLError_GpuIsLost
¶
-
exception
watchme.watchers.gpu.pynvml.
NVMLError_InsufficientPower
¶
-
exception
watchme.watchers.gpu.pynvml.
NVMLError_InsufficientSize
¶
-
exception
watchme.watchers.gpu.pynvml.
NVMLError_InvalidArgument
¶
-
exception
watchme.watchers.gpu.pynvml.
NVMLError_IrqIssue
¶
-
exception
watchme.watchers.gpu.pynvml.
NVMLError_LibRmVersionMismatch
¶
-
exception
watchme.watchers.gpu.pynvml.
NVMLError_LibraryNotFound
¶
-
exception
watchme.watchers.gpu.pynvml.
NVMLError_NoPermission
¶
-
exception
watchme.watchers.gpu.pynvml.
NVMLError_NotFound
¶
-
exception
watchme.watchers.gpu.pynvml.
NVMLError_NotSupported
¶
-
exception
watchme.watchers.gpu.pynvml.
NVMLError_OperatingSystem
¶
-
exception
watchme.watchers.gpu.pynvml.
NVMLError_ResetRequired
¶
-
exception
watchme.watchers.gpu.pynvml.
NVMLError_Timeout
¶
-
exception
watchme.watchers.gpu.pynvml.
NVMLError_Uninitialized
¶
-
exception
watchme.watchers.gpu.pynvml.
NVMLError_Unknown
¶
-
class
watchme.watchers.gpu.pynvml.
c_nvmlAccountingStats_t
[source]¶ Bases:
watchme.watchers.gpu.pynvml._PrintableStructure
-
gpuUtilization
¶ Structure/Union member
-
isRunning
¶ Structure/Union member
-
maxMemoryUsage
¶ Structure/Union member
-
memoryUtilization
¶ Structure/Union member
-
reserved
¶ Structure/Union member
-
startTime
¶ Structure/Union member
-
time
¶ Structure/Union member
-
-
class
watchme.watchers.gpu.pynvml.
c_nvmlBAR1Memory_t
[source]¶ Bases:
watchme.watchers.gpu.pynvml._PrintableStructure
-
bar1Free
¶ Structure/Union member
-
bar1Total
¶ Structure/Union member
-
bar1Used
¶ Structure/Union member
-
-
class
watchme.watchers.gpu.pynvml.
c_nvmlBridgeChipHierarchy_t
[source]¶ Bases:
watchme.watchers.gpu.pynvml._PrintableStructure
-
bridgeChipInfo
¶ Structure/Union member
-
bridgeCount
¶ Structure/Union member
-
-
class
watchme.watchers.gpu.pynvml.
c_nvmlBridgeChipInfo_t
[source]¶ Bases:
watchme.watchers.gpu.pynvml._PrintableStructure
-
fwVersion
¶ Structure/Union member
-
type
¶ Structure/Union member
-
-
watchme.watchers.gpu.pynvml.
c_nvmlDevice_t
¶ alias of
watchme.watchers.gpu.pynvml.LP_struct_c_nvmlDevice_t
-
class
watchme.watchers.gpu.pynvml.
c_nvmlEccErrorCounts_t
[source]¶ Bases:
watchme.watchers.gpu.pynvml._PrintableStructure
-
deviceMemory
¶ Structure/Union member
-
l1Cache
¶ Structure/Union member
-
l2Cache
¶ Structure/Union member
-
registerFile
¶ Structure/Union member
-
-
class
watchme.watchers.gpu.pynvml.
c_nvmlEventData_t
[source]¶ Bases:
watchme.watchers.gpu.pynvml._PrintableStructure
-
device
¶ Structure/Union member
-
eventData
¶ Structure/Union member
-
eventType
¶ Structure/Union member
-
-
watchme.watchers.gpu.pynvml.
c_nvmlEventSet_t
¶ alias of
watchme.watchers.gpu.pynvml.LP_struct_c_nvmlEventSet_t
-
class
watchme.watchers.gpu.pynvml.
c_nvmlHwbcEntry_t
[source]¶ Bases:
watchme.watchers.gpu.pynvml._PrintableStructure
-
firmwareVersion
¶ Structure/Union member
-
hwbcId
¶ Structure/Union member
-
-
class
watchme.watchers.gpu.pynvml.
c_nvmlLedState_t
[source]¶ Bases:
watchme.watchers.gpu.pynvml._PrintableStructure
-
cause
¶ Structure/Union member
-
color
¶ Structure/Union member
-
-
class
watchme.watchers.gpu.pynvml.
c_nvmlMemory_t
[source]¶ Bases:
watchme.watchers.gpu.pynvml._PrintableStructure
-
free
¶ Structure/Union member
-
total
¶ Structure/Union member
-
used
¶ Structure/Union member
-
-
class
watchme.watchers.gpu.pynvml.
c_nvmlPSUInfo_t
[source]¶ Bases:
watchme.watchers.gpu.pynvml._PrintableStructure
-
current
¶ Structure/Union member
-
power
¶ Structure/Union member
-
state
¶ Structure/Union member
-
voltage
¶ Structure/Union member
-
-
class
watchme.watchers.gpu.pynvml.
c_nvmlProcessInfo_t
[source]¶ Bases:
watchme.watchers.gpu.pynvml._PrintableStructure
-
pid
¶ Structure/Union member
-
usedGpuMemory
¶ Structure/Union member
-
-
class
watchme.watchers.gpu.pynvml.
c_nvmlSample_t
[source]¶ Bases:
watchme.watchers.gpu.pynvml._PrintableStructure
-
sampleValue
¶ Structure/Union member
-
timeStamp
¶ Structure/Union member
-
-
class
watchme.watchers.gpu.pynvml.
c_nvmlUnitFanInfo_t
[source]¶ Bases:
watchme.watchers.gpu.pynvml._PrintableStructure
-
speed
¶ Structure/Union member
-
state
¶ Structure/Union member
-
-
class
watchme.watchers.gpu.pynvml.
c_nvmlUnitFanSpeeds_t
[source]¶ Bases:
watchme.watchers.gpu.pynvml._PrintableStructure
-
count
¶ Structure/Union member
-
fans
¶ Structure/Union member
-
-
class
watchme.watchers.gpu.pynvml.
c_nvmlUnitInfo_t
[source]¶ Bases:
watchme.watchers.gpu.pynvml._PrintableStructure
-
firmwareVersion
¶ Structure/Union member
-
id
¶ Structure/Union member
-
name
¶ Structure/Union member
-
serial
¶ Structure/Union member
-
-
watchme.watchers.gpu.pynvml.
c_nvmlUnit_t
¶ alias of
watchme.watchers.gpu.pynvml.LP_struct_c_nvmlUnit_t
-
class
watchme.watchers.gpu.pynvml.
c_nvmlUtilization_t
[source]¶ Bases:
watchme.watchers.gpu.pynvml._PrintableStructure
-
gpu
¶ Structure/Union member
-
memory
¶ Structure/Union member
-
-
class
watchme.watchers.gpu.pynvml.
c_nvmlValue_t
[source]¶ Bases:
_ctypes.Union
-
dVal
¶ Structure/Union member
-
uiVal
¶ Structure/Union member
-
ulVal
¶ Structure/Union member
-
ullVal
¶ Structure/Union member
-
-
class
watchme.watchers.gpu.pynvml.
c_nvmlViolationTime_t
[source]¶ Bases:
watchme.watchers.gpu.pynvml._PrintableStructure
-
referenceTime
¶ Structure/Union member
-
violationTime
¶ Structure/Union member
-
-
watchme.watchers.gpu.pynvml.
nvmlDeviceGetMemoryErrorCounter
(handle, errorType, counterType, locationType)[source]¶
-
watchme.watchers.gpu.pynvml.
nvmlDeviceSetApplicationsClocks
(handle, maxMemClockMHz, maxGraphicsClockMHz)[source]¶
-
watchme.watchers.gpu.pynvml.
nvmlDeviceSetDefaultAutoBoostedClocksEnabled
(handle, enabled, flags)[source]¶
-
class
watchme.watchers.gpu.pynvml.
nvmlPciInfo_t
[source]¶ Bases:
watchme.watchers.gpu.pynvml._PrintableStructure
-
bus
¶ Structure/Union member
-
busId
¶ Structure/Union member
-
device
¶ Structure/Union member
-
domain
¶ Structure/Union member
-
pciDeviceId
¶ Structure/Union member
-
pciSubSystemId
¶ Structure/Union member
-
reserved0
¶ Structure/Union member
-
reserved1
¶ Structure/Union member
-
reserved2
¶ Structure/Union member
-
reserved3
¶ Structure/Union member
-
watchme.watchers.gpu.tasks module¶
Copyright (C) 2019 Vanessa Sochat.
This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
-
watchme.watchers.gpu.tasks.
gpu_task
(**kwargs)[source]¶ Get variables about the gpu of the host. No parameters are required. We’ve already instantited the Task object and have checked that the calling host has nvml GPU
- Parameters
skip (an optional list of (comma separated) fields to skip. Can be in) – net_io_counters,net_connections,net_if_address,net_if_stats
Module contents¶
Copyright (C) 2019 Vanessa Sochat.
This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
-
class
watchme.watchers.gpu.
Task
(name, params=None, **kwargs)[source]¶ Bases:
watchme.tasks.TaskBase
-
assert_gpu
()[source]¶ has_gpu is run from the getgo to see if there are any libraries for the client to read from. If not, we alert the user and exit.
-
export_func
()[source]¶ this function should return the correct task (from the tasks.py in the same folder) based on some logic of the params that are given by the user (self.params). If there is only one kind of function for the task, it’s fairly easy to import and return it here. This function should take no arguments, but instead use the self.params already provided in the client.
-
required_params
= []¶
-