-
Notifications
You must be signed in to change notification settings - Fork 22
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
Accomodate Base.stack
#119
Comments
Can this simply be deleted, and add The Base one covers more cases, but with
Edit: maybe this is the problem:
Base.stack disallows that in the name of type-stability. (It could perhaps be weakened if someone finds a way, perhaps by encouraging constant propagation or something. Or by accepting One path for now would be to define a new much simpler |
This package currently exports Or is exporting |
BTW, Base.stack also matches this method of
which is itself a little strange. Wouldn't it be more consistent for that to match the other methods of
So perhaps that's another candidate for related breaking changes. And maybe this shouldn't be called |
In some sense function roundtrip(xs)
y = batch(xs)
xs2 = [getobs(y, i) for i in 1:numobs(y)] # equivalent to unbatch(y)
@assert xs == xs2
end
roundtrip([1:2, 3:4, 5:6])
roundtrip([(1,2), (3,4), (5,6)])
roundtrip([Dict(:a=>1,:b=>2), Dict(:a=>3,:b=>4), Dict(:a=>5, :b=>6)]) so we should keep things as they are |
Ok. If the intention is to be this inverse, can this be clearly documented somewhere? All I can see is https://juliaml.github.io/MLUtils.jl/dev/api/#MLUtils.batch I also think what exactly
or else explains what you hope for when someone extends this
without first saying clearly what it actually does on Base types like arrays, tuples, etc. |
If making another breaking change soon, then why isn't Or why would you call that and not |
JuliaLang/julia#43334 recently landed, so now
using MLUtils
causes issues downstream in Flux. Not sure which level of the stack is better to address this in.The text was updated successfully, but these errors were encountered: