Skip to content

Make Diagonalize typing more strict#287

Merged
ValerianRey merged 5 commits intomainfrom
fix-diagonalize-key-order
Apr 3, 2025
Merged

Make Diagonalize typing more strict#287
ValerianRey merged 5 commits intomainfrom
fix-diagonalize-key-order

Conversation

@PierreQuinton
Copy link
Copy Markdown
Contributor

@PierreQuinton PierreQuinton commented Mar 31, 2025

  • Change type of considered from Iterable[Tensor] to OrderedSet[Tensor] and rename it to key_order

@PierreQuinton PierreQuinton added package: autojac cc: refactor Conventional commit type for any refactoring, not user-facing, and not typing or perf improvements labels Mar 31, 2025
@PierreQuinton PierreQuinton changed the base branch from main to improve-required-output-keys March 31, 2025 15:14
@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 31, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

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

Base automatically changed from improve-required-output-keys to main March 31, 2025 15:23
@PierreQuinton PierreQuinton force-pushed the fix-diagonalize-key-order branch from 5293af9 to 2f85f63 Compare March 31, 2025 15:33
@PierreQuinton PierreQuinton added cc: test Conventional commit type for changes to tests. and removed cc: refactor Conventional commit type for any refactoring, not user-facing, and not typing or perf improvements labels Mar 31, 2025
@PierreQuinton PierreQuinton changed the title Improve diagonalize key order Improve diagonalize key_order type Mar 31, 2025
@PierreQuinton PierreQuinton changed the title Improve diagonalize key_order type Improve Diagonalize key_order type Mar 31, 2025
@PierreQuinton PierreQuinton changed the title Improve Diagonalize key_order type Fix Diagonalize key_order type Mar 31, 2025
@PierreQuinton PierreQuinton changed the title Fix Diagonalize key_order type Fix Diagonalize key_order type Mar 31, 2025
@PierreQuinton PierreQuinton changed the title Fix Diagonalize key_order type Fix Diagonalize key_order type Mar 31, 2025
@ValerianRey ValerianRey added cc: refactor Conventional commit type for any refactoring, not user-facing, and not typing or perf improvements and removed cc: test Conventional commit type for changes to tests. labels Mar 31, 2025
@ValerianRey ValerianRey changed the title Fix Diagonalize key_order type Make Diagonalize typing more strict Mar 31, 2025
Comment thread src/torchjd/autojac/_transform/diagonalize.py Outdated
Copy link
Copy Markdown
Contributor

@ValerianRey ValerianRey left a comment

Choose a reason for hiding this comment

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

The order of the provided keys matters in Diagonalize (c.f. test_permute_order in test_diagonalize.py). This makes it explicit.

@ValerianRey ValerianRey merged commit 466f943 into main Apr 3, 2025
14 checks passed
@ValerianRey ValerianRey deleted the fix-diagonalize-key-order branch April 3, 2025 13:55
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: autojac

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants