Skip to content

Fix matrix sparsity analysis input handling#5557

Merged
rapids-bot[bot] merged 3 commits into
rapidsai:mainfrom
fallintoplace:fix-analyse-mtx-sparsity
Jul 13, 2026
Merged

Fix matrix sparsity analysis input handling#5557
rapids-bot[bot] merged 3 commits into
rapidsai:mainfrom
fallintoplace:fix-analyse-mtx-sparsity

Conversation

@fallintoplace

Copy link
Copy Markdown
Contributor

Summary

  • Move the Matrix Market CSR conversion back onto the valid-input path.
  • Return a nonzero exit code and write usage errors to stderr when no matrix path is provided.

Why

analyse_mtx_sparsity.py only assigned M inside the if M_in is None branch, after a raise. For valid inputs, the first M.has_sorted_indices access raised NameError before any sparsity analysis could run.

Validation

  • python3 -m py_compile python/utils/analyse_mtx_sparsity.py
  • No-argument invocation exits with status 1 and prints the usage error.
  • Smoke-tested a tiny temporary Matrix Market file with NumPy, SciPy, NetworkX 2.8.8, and Matplotlib.

@fallintoplace
fallintoplace requested a review from a team as a code owner June 11, 2026 16:52
@copy-pr-bot

copy-pr-bot Bot commented Jun 11, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

Comment thread python/utils/analyse_mtx_sparsity.py Outdated
@ChuckHastings ChuckHastings added bug Something isn't working non-breaking Non-breaking change python labels Jul 13, 2026
@ChuckHastings

Copy link
Copy Markdown
Collaborator

/okay to test f06564e

@ChuckHastings

Copy link
Copy Markdown
Collaborator

/merge

@rapids-bot
rapids-bot Bot merged commit b58f3d8 into rapidsai:main Jul 13, 2026
75 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working non-breaking Non-breaking change python

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants