Skip to content
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

Add casts to correct dtypes when converting a Tensor to a np.array #236

Merged
merged 1 commit into from
Jan 21, 2025

Conversation

PierreQuinton
Copy link
Contributor

The strategy was to set the type of a cast to a numpy array whenever the array was used in an operation that cast the type. So this makes every cast explicit.

Copy link

codecov bot commented Jan 21, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Files with missing lines Coverage Δ
src/torchjd/aggregation/cagrad.py 97.56% <100.00%> (ø)
src/torchjd/aggregation/dualproj.py 100.00% <100.00%> (ø)
src/torchjd/aggregation/upgrad.py 98.03% <100.00%> (ø)

@PierreQuinton PierreQuinton self-assigned this Jan 21, 2025
@PierreQuinton PierreQuinton merged commit 3a3c459 into main Jan 21, 2025
11 checks passed
@PierreQuinton PierreQuinton deleted the explicit_dtypes branch January 21, 2025 16:24
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.

dtype confusion when converting to np.array
1 participant