mirror of
https://github.com/XuehaiPan/nvitop.git
synced 2026-05-15 14:15:55 -06:00
[PR #25] [MERGED] refactor(core/libnvml): use module-based approach rather than singleton #125
Labels
No labels
api
bug
bug
cli / tui
dependencies
documentation
documentation
documentation
duplicate
enhancement
exporter
invalid
pull-request
pynvml
question
question
upstream
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/nvitop#125
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/XuehaiPan/nvitop/pull/25
Author: @XuehaiPan
Created: 7/16/2022
Status: ✅ Merged
Merged: 7/17/2022
Merged by: @XuehaiPan
Base:
main← Head:libnvml📝 Commits (5)
630324erefactor(core/libnvml): renamenvmltolibnvmlb08fb42chore(core/host): delete imported references327866arefactor(core/libnvml): use module-based approach rather than singleton20bf3fedocs(core/libnvml): add docs for NVML constants93e426adocs(core/version): update docstring forPYNVML_VERSION_CANDIDATES📊 Changes
11 files changed (+470 additions, -355 deletions)
View changed files
📝
docs/source/apis/core/libnvml.rst(+0 -1)📝
nvitop/callbacks/keras.py(+4 -4)📝
nvitop/callbacks/pytorch_lightning.py(+4 -4)📝
nvitop/cli.py(+6 -6)📝
nvitop/core/__init__.py(+3 -3)📝
nvitop/core/device.py(+90 -90)📝
nvitop/core/host.py(+3 -0)📝
nvitop/core/libnvml.py(+353 -240)📝
nvitop/core/process.py(+2 -3)📝
nvitop/gui/library/device.py(+3 -3)📝
nvitop/version.py(+2 -1)📄 Description
Issue Type
Runtime Environment
3.9.13470.129.06nvitopversion or commit:main@6bf151python-ml-pyversion:11.450.51en_US.UTF-8Description
Use a module-based approach rather than a singleton class. Previously, we use a singleton class
libnvmland the singletonnvmlto support the context manager (withstatement). Now, the mechanism is replaced by a custom module type.Motivation and Context
Simplify module hierarchy. Make the IDE happy and let sphinx generate more documents from
autoapi.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.