docs: update cross reference

Signed-off-by: Xuehai Pan <XuehaiPan@pku.edu.cn>
This commit is contained in:
Xuehai Pan 2022-09-09 16:01:59 +08:00
parent 2fee1fdf6c
commit 3b82dbbb57
4 changed files with 6 additions and 6 deletions

View file

@ -552,7 +552,7 @@ class Device: # pylint: disable=too-many-instance-attributes,too-many-public-me
uuid: Optional[str] = None,
bus_id: Optional[str] = None
) -> None:
"""Initializes the instance created by ``__new__()``.
"""Initializes the instance created by :meth:`__new__()`.
Raises:
libnvml.NVMLError_LibraryNotFound:
@ -1878,7 +1878,7 @@ class MigDevice(Device): # pylint: disable=too-many-instance-attributes
def __init__(
self, index: Optional[Union[Tuple[int, int], str]] = None, *, uuid: Optional[str] = None
) -> None:
"""Initializes the instance created by ``__new__()``.
"""Initializes the instance created by :meth:`__new__()`.
Raises:
libnvml.NVMLError_LibraryNotFound:
@ -2191,7 +2191,7 @@ class CudaDevice(Device):
nvml_index: Optional[Union[int, Tuple[int, int]]] = None,
uuid: Optional[str] = None
) -> None:
"""Initializes the instance created by ``__new__()``.
"""Initializes the instance created by :meth:`__new__()`.
Raises:
libnvml.NVMLError_LibraryNotFound:

View file

@ -284,7 +284,7 @@ def nvmlShutdown() -> None: # pylint: disable=function-redefined
If RM detects a driver/library version mismatch, usually after an upgrade for NVIDIA
driver without reloading the kernel module.
NVMLError_Uninitialized:
If NVML was not first initialized with ``nvmlInit()``.
If NVML was not first initialized with :func:`nvmlInit`.
"""
global __flags, __initialized # pylint: disable=global-statement,global-variable-not-assigned

View file

@ -490,7 +490,7 @@ class GpuProcess: # pylint: disable=too-many-instance-attributes,too-many-publi
compute_instance_id: Optional[Union[int, NaType]] = None,
type: Optional[Union[str, NaType]] = None, # pylint: disable=redefined-builtin
) -> None:
"""Initializes the instance returned by ``__new__()``."""
"""Initializes the instance returned by :meth:`__new__()`."""
if gpu_memory is None and not hasattr(self, '_gpu_memory'):
gpu_memory = NA

View file

@ -152,7 +152,7 @@ class DevicePanel(Displayable): # pylint: disable=too-many-instance-attributes
)
device.mig_mode = device.mig_mode.replace('N/A', 'N/A ')
device.compute_mode = device.compute_mode.replace('Exclusive', 'E.')
if device.fan_speed >= 100:
if device.fan_speed is not NA and device.fan_speed >= 100:
device.fan_speed_string = 'MAX'
with self.snapshot_lock: