[PR #146] [MERGED] fix(api/device): fix passing invalid device handle to NVML functions #171

Closed
opened 2026-05-05 03:27:12 -06:00 by gitea-mirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/XuehaiPan/nvitop/pull/146
Author: @XuehaiPan
Created: 1/13/2025
Status: Merged
Merged: 1/13/2025
Merged by: @XuehaiPan

Base: mainHead: fix-invalid-device-handle


📝 Commits (4)

  • dccbc4d fix(api/device): fix passing invalid device handle to NVML functions
  • 958c057 docs(CHANGELOG): update CHANGELOG.md
  • c04750b chore(pre-commit): update pre-commit hooks
  • ce6edf7 docs: add PYTHONFAULTHANDLER=1 variable in bug report

📊 Changes

7 files changed (+220 additions, -153 deletions)

View changed files

📝 .github/ISSUE_TEMPLATE/bug-report.yaml (+2 -2)
📝 .github/ISSUE_TEMPLATE/feature-request.yaml (+1 -1)
📝 .github/ISSUE_TEMPLATE/questions.yaml (+1 -1)
📝 .pre-commit-config.yaml (+1 -1)
📝 CHANGELOG.md (+1 -0)
📝 nvitop-exporter/nvitop_exporter/exporter.py (+2 -3)
📝 nvitop/api/device.py (+212 -145)

📄 Description

Issue Type

  • Bug fix

Description

Add guard self.handle is not None in query functions.

Motivation and Context

Fixes #145
Fixes #139


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/XuehaiPan/nvitop/pull/146 **Author:** [@XuehaiPan](https://github.com/XuehaiPan) **Created:** 1/13/2025 **Status:** ✅ Merged **Merged:** 1/13/2025 **Merged by:** [@XuehaiPan](https://github.com/XuehaiPan) **Base:** `main` ← **Head:** `fix-invalid-device-handle` --- ### 📝 Commits (4) - [`dccbc4d`](https://github.com/XuehaiPan/nvitop/commit/dccbc4d8d4af3fdb3be878fa776190f018662784) fix(api/device): fix passing invalid device handle to NVML functions - [`958c057`](https://github.com/XuehaiPan/nvitop/commit/958c0578b10eee02eec981ce2bc21ef7bea70e5a) docs(CHANGELOG): update CHANGELOG.md - [`c04750b`](https://github.com/XuehaiPan/nvitop/commit/c04750b490914b8c9b06bf4d1591bc8747dbb535) chore(pre-commit): update pre-commit hooks - [`ce6edf7`](https://github.com/XuehaiPan/nvitop/commit/ce6edf7160e81dd0a6a3547e9702569d1d143899) docs: add `PYTHONFAULTHANDLER=1` variable in bug report ### 📊 Changes **7 files changed** (+220 additions, -153 deletions) <details> <summary>View changed files</summary> 📝 `.github/ISSUE_TEMPLATE/bug-report.yaml` (+2 -2) 📝 `.github/ISSUE_TEMPLATE/feature-request.yaml` (+1 -1) 📝 `.github/ISSUE_TEMPLATE/questions.yaml` (+1 -1) 📝 `.pre-commit-config.yaml` (+1 -1) 📝 `CHANGELOG.md` (+1 -0) 📝 `nvitop-exporter/nvitop_exporter/exporter.py` (+2 -3) 📝 `nvitop/api/device.py` (+212 -145) </details> ### 📄 Description <!-- Provide a descriptive summary of the changes in the title above --> #### Issue Type <!-- Pick relevant types and delete the rest --> - Bug fix #### Description <!-- Describe the changes in detail --> Add guard `self.handle is not None` in query functions. #### Motivation and Context <!-- Why are these changes required? --> <!-- What problems do these changes solve? --> <!-- Link to relevant issues --> Fixes #145 Fixes #139 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
gitea-mirror 2026-05-05 03:27:12 -06:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/nvitop#171
No description provided.