Small release to improve some parts of the code
Initial release of gpumonitor. It includes the
GpuMonitor element and 2 callbacks: one for TensorFlow and one for PyTorch Lightning. Usage is the following.
If you want to monitor your custom script, you can simply execute it with a
from gpumonitor.monitor import GpuMonitor monitor = GpuMonitor(delay=1) # Your own script here monitor.stop() monitor.display_average_stats_per_gpu()
from gpumonitor.callbacks.tf import TFGpuMonitorCallback model.fit(x, y, callbacks=[TFGpuMonitorCallback(delay=0.5)])
For PyTorch Lightning,
from gpumonitor.callbacks.lightning import PyTorchGpuMonitorCallback trainer = pl.Trainer(callbacks=[PyTorchGpuMonitorCallback(delay=0.5)]) trainer.fit(model)