-
-
Notifications
You must be signed in to change notification settings - Fork 311
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
[WIP] Using a Compute graph as alternative to Observables #4630
base: master
Are you sure you want to change the base?
Conversation
… into sd/compute-graph
if isnothing(value) | ||
edge.outputs_dirty[i] = false | ||
else | ||
edge.outputs_dirty[i] = true | ||
edge.outputs[i][] = value | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I understand correctly this interprets nothing
as "the value has not changed". In that case shouldn't it leave the dirty state untouched? If a previous call has dirtied output i and this call has not changed it, it should still dirty, right?
if isnothing(value) | |
edge.outputs_dirty[i] = false | |
else | |
edge.outputs_dirty[i] = true | |
edge.outputs[i][] = value | |
end | |
if !isnothing(value) | |
edge.outputs_dirty[i] = true | |
edge.outputs[i][] = value | |
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In that case shouldn't it leave the dirty state untouched? If a previous call has dirtied output i and this call has not changed it, it should still dirty, right?
No, the dirty state is local to the current resolve.
So needs to be set to the correct value when setting the new value.
We still need to double check if there's a simpler and more consistent way and add some tests if this works 100% as intended, but right now outputs_dirty
is only for the children of an edge to figure out after a resolve if a value has changed from that particular resolve.
… into sd/compute-graph
Progress on GLMakie: The number of failing tests is now down to 15, with 27 tests throwing errors. TODOs/Problems:
|
* deparametrize Computed and cache outputs_dirty in Computed * cleanup/fix output_dirty propagation * remove redundant output_dirty from Input * fix Input constructor * rename ComputedValue -> Computed * skip outputs_dirty (update Computed directly) * improve printing a bit --------- Co-authored-by: Simon <[email protected]>
CairoMakie is now at 2 fails - 28 errors, GLMakie at 14-27 |
This introcudes
ComputePipeline
(all names very WIP) as an alternative to Observables, which solves:State of this PR: first implementation for Scatter, hacking into the plot pipeline to replace the Scatter constructor and hijack it with a computegraph implementation for convert_arguments/convert_attributes and any backend computation.
Only prototyped for GLMakie right now.
It currently leaves the plot type unchanged and stores the compute graph in
plot.args[1]
(lol) and overloads a few methods already just for Scatter (not getproperty etc though, yet).Next steps:
Continuation of: #4550 and #4360