Skip to content

Conversation

XuehaiPan
Copy link
Owner

Issue Type

  • Bug fix

Description

Do not reassign the cache to a new dict if it is empty.

Motivation and Context

Fixes #171

@XuehaiPan XuehaiPan self-assigned this Jul 24, 2025
@XuehaiPan XuehaiPan added bug Something isn't working api Something related to the core APIs cli / tui Something related to the CLI labels Jul 24, 2025
@XuehaiPan XuehaiPan requested a review from Copilot July 24, 2025 16:01
Copilot

This comment was marked as outdated.

@XuehaiPan XuehaiPan requested a review from Copilot July 24, 2025 16:06
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes a bug in the snapshot cache handling for GPU processes that share a host process. The issue was caused by the original code using the or operator which would reassign an empty cache dictionary to a new instance, breaking cache sharing between processes.

  • Replaces the or operator with explicit None check to preserve empty cache dictionaries
  • Updates CHANGELOG.md to document the bug fix and a minor TUI improvement

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
nvitop/api/process.py Fixes cache handling logic to preserve empty dictionaries instead of reassigning them
CHANGELOG.md Documents the bug fix and an unrelated TUI display improvement

@XuehaiPan XuehaiPan merged commit 8a02ca5 into main Jul 24, 2025
2 checks passed
@XuehaiPan XuehaiPan deleted the fix-cpu-snapshot branch July 24, 2025 16:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api Something related to the core APIs bug Something isn't working cli / tui Something related to the CLI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] Shared GPU Job - listed CPU %
1 participant