Closed marios1861 closed 8 months ago
Hi @marios1861, does lightning.pytorch.callbacks.DeviceStatsMonitor
fit your use case? The callback in nvitop
has not been updated for years. I would rather mark it as deprecated. Because we don't have a release schedule that's aligned with Lightning-AI/lightning. See my previous discussion in https://github.com/XuehaiPan/nvitop/pull/84#issuecomment-1663400377.
When using pytorch lightning callback,
model_helpers
function inlightning.pytorch.utilities
raisesValueError("Expected a parent")
, even thoughelif isinstance(instance, pl.Callback): parent = pl.Callback
should be the chosen branch,
isinstance(instance, pl.Callback)
returns false. After further inspection, the older package pytorch_lightning is being used, which can be replaced without any further changes with lightning.pytorch.
@marios1861 I guess you are using lightning.pytorch
rather than pytorch_lightning
, right?
Hello @XuehaiPan, yes I am using lightning.pytorch (the package was renamed). lightning.pytorch.callbacks.DeviceStatsMonitor is fine as well, but with adaptor modules (nvitop - lightning in this case) it's not very clear where the responsibility of implementation lies. Since lightning provides the base class for implementing callbacks, I would provide the implementation in nvitop. If that isn't your decision that's fine too.
Required prerequisites
What version of nvitop are you using?
1.3.1
Operating system and version
Ubuntu 20.04.6 LTS
NVIDIA driver version
535.129.03
NVIDIA-SMI
No response
Python environment
poetry environment
Problem description
When using pytorch lightning callback,
model_helpers
function inlightning.pytorch.utilities
raisesValueError("Expected a parent")
, even thoughshould be the chosen branch,
isinstance(instance, pl.Callback)
returns false. After further inspection, the older package pytorch_lightning is being used, which can be replaced without any further changes with lightning.pytorch.Steps to Reproduce
Traceback
Logs
No response
Expected behavior
No response
Additional context
No response