StructWalk.jl
StructWalk.jl copied to clipboard
This package seems to me the way Functors.jl should be, more flexible and also easier to understand. Can we expand on the example in readme and define a `FunctorStyle` that...
This is currently broken https://chengchingwen.github.io/StructWalk.jl/stable
An attempt at reimplementing Functors.jl interface on top of StructWalk.jl. The only limitation so far encountered is in `walk` splitting the children in the constructor, `T(ch...)`, therefore losing information in...
Functors.jl now returns named tuples as children. It would be nice if we could have the same behavior also here for the default walk style and supported or required for...
The purpose of `iscontainer` and the role it plays in the walk is not clear from the documentation: ``` """ iscontainer(s::WalkStyle, x) Return a `Bool` indicating whether `children(x)` return a...
I wanted to pick up from our discussion in https://github.com/FluxML/Functors.jl/pull/32, in particular around your comments in https://github.com/FluxML/Functors.jl/pull/32#issuecomment-1026454917. I think one concrete example to work off of is a function like...
Currently we have ```julia StructWalk.scan(model, grad) do tupl x, g = tupl # ... end ``` while I think it would be more idiomatic to pass separate arguments instead of...
It's not entirely clear from the documentation that a leaf is something for which `isempty(children(walkstyle, x))`. Maybe it is obvious, but still it would be helpful to explicitly state this....
The methods `postwalk(f, [style,] x, y, z...)` etc.. are not documented yet. They seem useful, so it would be nice to expose them.