-
-
Notifications
You must be signed in to change notification settings - Fork 608
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
Minimal fix of #1556, remove eltype checks #1558
Conversation
Okay well both this PR and #1557 are "approved" by me, but we can only merge one. Personally, there are aspects of both PRs that I would mix and match. #1557 removes the inner constructor for |
Thanks for the PR! Appreciate the quick response, and agree that we don't want to rush. This solves the particular MWE of #1556, on balance, we also add some other cleanups in the other PR, ie loosening the type restriction and removing the inner constructor which we want. These are connected issues and both good changes. What I am inclined to do is merge both PRs, since #1557 is effectively a superset. bors r+ |
bors ping |
pong |
Probably the test @mcabbott mentioned can be added to the "downstream CI" @DhairyaLGandhi is adding in #1555. We should also add some tests for "non-conventional" parameter array types. |
Never mind, I misunderstood the downstream CI. We should add the tests mentioned here directly to Flux. |
Fix #1556, closes #1557.
Tests of this conversion behaviour are left skipped for now, that seems the minimal step. Perhaps friendly warnings if you're about to accidentally promote to Float64 can be combined with not rejecting tracking types. But that need not be designed in a rush.
The complete solution of #1556 should include tests of gradients through the
re
ofdestructure
. At the moment it is (I think) only tested alongsideloadparams!
as an "offline" utility, but clearly it's also useful to map a vector of parameters to a model inside a solver, etc. Perhaps it can be made faster, too.