Gpumonitor

Latest version: v0.1.2

Safety actively analyzes 621095 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

0.1.2

Changes:

- [x] Default delay value
- [x] Display option improved (add fan speed, gpu consumption)

0.1.1

Small release to improve some parts of the code

- [x] Indicators are aggregated on the fly, instead of storing every entry points of the epoch
- [x] Indicators are now integers to improve readbility

0.1.0

Initial release of gpumonitor. It includes the `GpuMonitor` element and 2 callbacks: one for TensorFlow and one for PyTorch Lightning. Usage is the following.

For custom script

If you want to monitor your custom script, you can simply execute it with a `GpuMonitor` initialized:

python
from gpumonitor.monitor import GpuMonitor

monitor = GpuMonitor(delay=1)

Your own script here

monitor.stop()
monitor.display_average_stats_per_gpu()


Callbacks

For [TensorFlow](https://www.github.com/tensorflow/tensorflow),

python
from gpumonitor.callbacks.tf import TFGpuMonitorCallback

model.fit(x, y, callbacks=[TFGpuMonitorCallback(delay=0.5)])


For [PyTorch Lightning](https://github.com/PyTorchLightning/pytorch-lightning),

python
from gpumonitor.callbacks.lightning import PyTorchGpuMonitorCallback

trainer = pl.Trainer(callbacks=[PyTorchGpuMonitorCallback(delay=0.5)])
trainer.fit(model)

Links

Releases

Has known vulnerabilities

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.