-
Notifications
You must be signed in to change notification settings - Fork 4
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
Show intermediate values #270
Comments
I’m inclined to say this is an orthogonal requirement after all – linked inputs and linked outputs scenarios can easily exist within a “single” program (for linked outputs we just need some way of composing visualisations). |
Prezi‘s “nested presentations” could be a useful source of ideas. |
Renamed from “Cellular Fluid” and incorporated @JosephBond‘s description. |
I think convolution would work as a nice example here too: we could use different boundary methods (zero-padding vs. wrapping, etc) to demonstrate multiverses (#1183) and the intermediate arrays (one per output element) which have the same dimensions as the filter as the intermediate values of interest. |
Expanding on @rolyp's most recent suggestion: the thing we use to perform early-stopping on a call to
This kind of structure is laborious to work out by hand, especially with the nested pattern matching. I wonder if its possible to automatically derive the Trace structure we are looking for by supplying the original expression, parsing it, and then - in evaluation - capturing the chunk of the trace we are looking for when going forward, since we have to perform forward evaluation anyway. Edit: actually the structure is even more complex to manually derive, since the computation we are actually interested in inspecting is:
By recursing further up through the |
The idea of extracting the fragment of the trace that specifies the creation of the intermediate value would rely on supplying extra information to |
Problem formulationYesterday I proposed understanding the problem as “find the application The specific intermediate value(s) of interest needs to be determined by the selection on the output, so that mousing over the output matrix reveals different intermediate values. We could implement some bespoke logic that queries the output matrix to determine the indices of selected cells, and then use a modified Observations
|
Naively adding a new edge for the lookup seems to fail, since the exact same lookup can be performed multiple times, naively including a call like
Alternatively:
@rolyp do you have a preference for either of these? My gut reaction is that the second option makes more sense |
Yes weakening the For this initial experiment, let’s try just relaxing the constraint, but could you also add a “to do” to this task to revisit the idea of reinstating it (along the lines just sketched) if we do end up committing to this direction? |
Relaxing the constraint breaks 8 tests, the convolution tests (inc
|
Let’s separate these into:
Could you also push your branch so I can take a look at the changes? |
I've pushed now. |
changing line 141 from |
I've fixed the relaxation of the constraint on
This change breaks the invariant that inputs are sinks on the convolution examples |
Ok, that makes some kind of sense. Let’s have a think about this. |
Current iteration (with
These results were from a run where the implementation of
The issue is that in the graph I added an edge between α' and α, but in the trace version I took (α ∧ α'). Changing the result of fwd to just copy the annotation on the matrix changes the errors to the following:
|
Tracking “intermediates”-related tasks as part of |
We are able to visualize intermediate values that arise from transient selections in the convolution example, albeit with problems related to layout and interaction. These problems represent the next selection of tasks to be picked off.
In the convolution example, we want to be able to see the intermediate matrix used to compute a given cell of the output. To support this kind of use case, we need (the beginnings of) a notebook-like presentation of the program as a graph of cells. (This graph is in some sense an abstraction of the DDG.)
See also
The text was updated successfully, but these errors were encountered: