Skip to content

Commit

Permalink
Add docstrings to MockWorker class
Browse files Browse the repository at this point in the history
  • Loading branch information
pentschev committed Jun 7, 2021
1 parent 9bc5c09 commit 5a175f0
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions dask_cuda/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -533,6 +533,13 @@ def parse_device_memory_limit(device_memory_limit, device_index=0):


class MockWorker(Worker):
"""Mock Worker class preventing NVML from getting used by SystemMonitor.
By preventing the Worker from initializing NVML in the SystemMonitor, we can
mock test multiple devices in `CUDA_VISIBLE_DEVICES` behavior with single-GPU
machines.
"""

def __init__(self, *args, **kwargs):
import distributed

Expand Down

0 comments on commit 5a175f0

Please sign in to comment.