Skip to content

How to get graph runtime in csp.graph? #489

Answered by AdamGlustein
jasonbourne13 asked this question in Q&A
Discussion options

You must be logged in to vote

Ok, I see what your issue is. In csp (and a lot of other computation graph libraries) there is a key distinction between wiring time (graph-time) and runtime (node-time).

Any code under csp.graph is graph-time code: this means that there are no values available yet, all that you are doing is describing your computation. This amounts to wiring the graph together, so when you call csp.times(...) in the graph it returns to you an Edge object that you can connect to other nodes. This is an Edge of datetime values, not a datetime itself. The actual datetimes will only be available at runtime.

Any code under csp.node is node-time code: the values accessed as inputs to a node and returned from a…

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@jasonbourne13
Comment options

@AdamGlustein
Comment options

Answer selected by AdamGlustein
@jasonbourne13
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants