From 06821b5f1b5cb14aa3443e305c78d84f3c1bca01 Mon Sep 17 00:00:00 2001
From: Xuehai Pan nvidia-smi.
en-US)
+------
+
## Requirements
- Python 3.5+ (with `pip>=10.0`)
@@ -122,6 +128,8 @@ Run `bash install-nvidia-driver.sh --help` for more information.
* The `curses` library is a built-in module of Python on Unix-like systems, and it is supported by a third-party package called `windows-curses` on Windows using PDCurses. Inconsistent behavior of `nvitop` may occur on different terminal emulators on Windows, such as missing mouse support.
+------
+
## Installation
Install from PyPI ([](https://pypi.org/project/nvitop) / ):
@@ -160,6 +168,8 @@ You can specified the version of `nvidia-ml-py` while installing `nvitop` as:
pip3 install 'nvitop[pynvml-11.450.51]' # or 'nvitop[cuda10]'
```
+------
+
## Usage
### Device and Process Status
@@ -380,6 +390,8 @@ echo 'set -gx NVITOP_MONITOR_MODE "full"' >> ~/.config/fish/config.fish
**HINT:** It's recommended to terminate or kill a process in the tree-view screen (shortcut: t).
+------
+
### Callback Functions for Machine Learning Frameworks
`nvitop` provides two builtin callbacks for [TensorFlow (Keras)](https://www.tensorflow.org) and [PyTorch Lightning](https://pytorchlightning.ai).
@@ -416,6 +428,8 @@ trainer = Trainer(gpus=[..], logger=True, callbacks=[gpu_stats])
Please refer to [Resource Metric Collector](#resource-metric-collector) for an example.
+------
+
### More than a Monitor
`nvitop` can be easily integrated into other applications. You can use `nvitop` to make your own monitoring tools. The full API references host at nvitop.
+------
+
#### Status Snapshot
`nvitop` provides a helper function to retrieve the status of both GPU devices and GPU processes at once. You can type `help(nvitop.take_snapshots)` in Python REPL for detailed documentation.
@@ -572,6 +588,8 @@ SnapshotResult(
Please refer to section [Low-level APIs](#low-level-apis) for more information.
+------
+
#### Resource Metric Collector
`ResourceMetricCollector` is a class that collects resource metrics for host, GPUs and processes running on the GPUs. All metrics will be collected in an asynchronous manner. You can type `help(nvitop.ResourceMetricCollector)` in Python REPL for detailed documentation.
@@ -706,6 +724,8 @@ df.insert(0, 'time', df['resources/timestamp'].map(datetime.datetime.fromtimesta
df.to_csv('results.csv', index=False)
```
+------
+
#### Low-level APIs
The full API references can be found at
+------
+
## License
`nvitop` is released under the **GNU General Public License, version 3 (GPLv3)**.