https://github.com/clumsy/viznvsmi
https://github.com/clumsy/viznvsmi
Last synced: 5 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/clumsy/viznvsmi
- Owner: clumsy
- License: apache-2.0
- Created: 2024-11-21T16:12:58.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-11-21T18:33:32.000Z (over 1 year ago)
- Last Synced: 2025-10-08T07:36:19.229Z (8 months ago)
- Language: Python
- Size: 8.79 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# VizNvsmi
[VizTracer](https://github.com/gaogaotiantian/viztracer) plugins for NVSMI.
It is inspired by the official VizTracer plugings: [vizplugins](https://github.com/gaogaotiantian/vizplugins).
# Features
VizNvsmi currently only supports NVIDIA metrics tracking via [nvidia-smi](https://docs.nvidia.com/deploy/nvidia-smi/index.html).
# Install
The preferred way to install VizNvsmi is via pip:
```sh
pip install viznvsmi
```
# Basic Usage
VizNvsmi should be used with VizTracer.
You can use VizNvsmi and the plugin via command line:
```sh
viztracer --plugin "viznvsmi --utilization.memory --utilization.gpu -i 0 -f 50" -- my_script.py arg1 arg2
```
Where:
* `-i` - specifies GPU id
* `-f` - specifies how many samples per seconds to collect
* other flags map to NVSMI metrics, the full list is available via `nvidia-smi --help-query-gpu`
You can also add the plugin to VizTracer programmatically as described in the [official documentation](https://viztracer.readthedocs.io/en/latest/plugins.html).
Finally, VizNvsmi provides a [PyTorch Lightning Callback](https://lightning.ai/docs/pytorch/stable/extensions/callbacks.html) that can be used as part of model training.