Skip to content

Remove arbitrary exception handling#269

Merged
ValerianRey merged 1 commit intomainfrom
remove-exception-handling-in-imtlg-and-aligned-mtl
Mar 25, 2025
Merged

Remove arbitrary exception handling#269
ValerianRey merged 1 commit intomainfrom
remove-exception-handling-in-imtlg-and-aligned-mtl

Conversation

@ValerianRey
Copy link
Copy Markdown
Contributor

  • Remove catching of RuntimeError (should have been more precisely LinalgError) in IMTLG when pinv fails
  • Remove catching of LinalgError in AlignedMTL when eigh fails
  • Add changelog entry

The reason why we added those exception catchings was that we used to test on matrices with an extremely large scale factor (like 1e20). Users don't usually need aggregators to work on such matrices. And in those cases, we barely made the aggregators give a result, not the result that they were supposed to give. For those reasons this change is like a fix removing something fairly arbitrary and not used in practice.

@ValerianRey ValerianRey added package: aggregation cc: fix Conventional commit type for bug fixes of the actual library (changes to src). labels Mar 25, 2025
@ValerianRey ValerianRey self-assigned this Mar 25, 2025
@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/aligned_mtl.py 100.00% <100.00%> (+6.81%) ⬆️
src/torchjd/aggregation/imtl_g.py 100.00% <100.00%> (+11.11%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@ValerianRey ValerianRey merged commit 6da02d4 into main Mar 25, 2025
14 checks passed
@ValerianRey ValerianRey deleted the remove-exception-handling-in-imtlg-and-aligned-mtl branch March 25, 2025 12:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cc: fix Conventional commit type for bug fixes of the actual library (changes to src). package: aggregation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants