-
Notifications
You must be signed in to change notification settings - Fork 1
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
Rough Optimisers sketch #17
base: main
Are you sure you want to change the base?
Conversation
@ericphanson what do you think about a function load_leaves(state, leaves::Array{Optimisers.Leaf})
counter = 1; fmap(state) do s
if Functors.isleaf(s)
new = leaves[counter]
counter += 1
else
new = s
end
new
end
end Here, If there is an in-place version possible -- we might go for that, however. |
1 similar comment
@ericphanson what do you think about a function load_leaves(state, leaves::Array{Optimisers.Leaf})
counter = 1; fmap(state) do s
if Functors.isleaf(s)
new = leaves[counter]
counter += 1
else
new = s
end
new
end
end Here, If there is an in-place version possible -- we might go for that, however. |
I think this could work too. I don’t really know how Optimisers works- is all the info always in the Leaf objects? |
No, there is no structural information in the leaves so you're relying on a stable topology (depends on the use case, bias vs no bias has caused issues before) + traversal order (guaranteed for now). |
@ericphanson my suggestion above is not a good one -- I didn't realize that you just serialize the entire state (I thought you still needed to walk and get leaves). |
Should we just go with this full Arrow serialization appoach then? We need to...
OR:
|
Normally, I would prefer the latter (not take on a new dependency, but instead upstream) -- but because this is If your upstream apache/arrow-julia#323 gets removed, I think we can expunge any piracy here? |
Assuming that |
No, the macro is ok either place, just a utility. The problem is LegolasFlux can’t define ArrowTypes methods for Optimisers objects. Either ArrowTypes or Optimisers has to do that for it not be piracy. |
Serializing the full nested structure with Arrow