8000 Revamp `Conjunction.__call__` by ValerianRey · Pull Request #374 · TorchJD/torchjd · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Revamp Conjunction.__call__ #374

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed

Conversation

ValerianRey
Copy link
Contributor
@ValerianRey ValerianRey commented May 29, 2025

EDIT: this is not good enough, because Conjunction still has other issues. See #379 for a much better fix of Conjunction.


This changes the implementation of Conjunction.__call__: now we first compute the union of the dictionaries, then compute the output_type, and then instantiate it with the union. This is easier to read in my opinion and it fixes types issues.

Note that this is conflicting with #369, which uses _C instead of _B, so we'll have to be careful when merging.

Copy link
codecov bot commented May 29, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

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

@ValerianRey ValerianRey changed the title Update Conjunction.__call__ to make its typing correct Revamp Conjunction.__call__ May 29, 2025
@ValerianRey ValerianRey mentioned this pull request May 29, 2025
1 task
@ValerianRey ValerianRey requested a review from PierreQuinton May 29, 2025 19:18
@ValerianRey ValerianRey marked this pull request as draft May 31, 2025 14:25
@ValerianRey ValerianRey deleted the revamp-conjunction-call branch June 3, 2025 22:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant
0