Open
Conversation
Codecov Report
@@ Coverage Diff @@
## main #9 +/- ##
==========================================
- Coverage 95.14% 94.73% -0.41%
==========================================
Files 15 15
Lines 350 323 -27
==========================================
- Hits 333 306 -27
Misses 17 17
|
baumgold
reviewed
Aug 20, 2023
| x4 = map((x,y)->println("x4"), x2, x3) | ||
| push!(Source(x1), nothing) # prints x2 x3 x4 | ||
| g, s1 = compile(x1) | ||
| push!(g, s1, nothing) # prints x2 x3 x4 |
Collaborator
There was a problem hiding this comment.
This push! notation seems a little awkward. If you think of the graph as a Dict of Source => Value pairs then maybe a nice API might be setindex! instead?
g[s1] = nothing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hi @baumgold ,
I changed the "logic" of this. I have a clearer separation of the "compiled" and "uncompiled" graphs.
It changes the API:
Source,compileto explicitly compile the graphpush!require the compiled graph (returned bycompile)Also, the (optional) tracking is integrated to the graph, no need to pass it to the push!
If you could have a look to the API, to tell me if you feel like it's good enough, that would be cool.
My next step is to change this whole "naming" of the nodes (that currently rely on gensym-ed names), to use some kind of hash of the operations instead. The goal is to avoid compiling several times the same nodes. It's not going to work in all cases as anonymous functions are compiled differently each time (whit a gensym-ed name). So creating twice a map node with an anonymous function is problematic. It can only work if the mapped function is named. But that is not surprising in Julia.