Skip to content

Remove exception re-raising with svd#270

Merged
ValerianRey merged 1 commit intomainfrom
remove-exception-reraising
Mar 25, 2025
Merged

Remove exception re-raising with svd#270
ValerianRey merged 1 commit intomainfrom
remove-exception-reraising

Conversation

@ValerianRey
Copy link
Copy Markdown
Contributor

  • Remove exception re-raising when torch.linalg.svd raises a LinalgError in _compute_normalized_gramian

This error is raised when the matrix contains nan values. It might also be raised for some very special ill-conditioned matrices (https://discuss.pytorch.org/t/fail-to-run-torch-linalg-svd-because-error-11/150418), but we could not reproduce this. The only point of re-raising this error was to get to know which kind of matrices could make these operations fail, but it's actually simpler to not have to maintain this.

@codecov
Copy link
Copy Markdown

codecov bot commented Mar 25, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Files with missing lines Coverage Δ
src/torchjd/aggregation/_gramian_utils.py 100.00% <100.00%> (+9.09%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@ValerianRey ValerianRey added the cc: refactor Conventional commit type for any refactoring, not user-facing, and not typing or perf improvements label Mar 25, 2025
@ValerianRey ValerianRey merged commit 5706a93 into main Mar 25, 2025
14 checks passed
@ValerianRey ValerianRey deleted the remove-exception-reraising branch March 25, 2025 13:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cc: refactor Conventional commit type for any refactoring, not user-facing, and not typing or perf improvements package: aggregation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant