-
Notifications
You must be signed in to change notification settings - Fork 85
Ability to run execution graph from an external application #31
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
Comments
I guess that it is already possible somehow, as you do communicate with native binary from python. Thanks. |
We're working on this, stay tuned. |
@joschu What do you think about cross-language execution graph serialization, with JSON or protobuf? Right now execution graphs are given to the C++ interpreter via Cython reading Python objects, but for this case we want a standalone C++ library to be able to read a serialized execution graph. This will introduce a dependency into the C++ side (for reading the serialized representation with a JSON library, for example), and might also introduce it to the Python side (if we use protobuf, which is not installed by default). |
I'm sorry to bother you...
MessagePack (http://msgpack.org/) also looks quite prominent for binary serialization, though I don't have any experience with it. |
Jonathan, I like the idea of having cross-language serialization using some standard format. One constraint is that we'll need to serialize numerical array data. This would be kludgy in JSON. If I remember correctly, @pcmoritz also recommended msgpack |
HDF5 is a good option and is already used in many Python projects. On Tue, Sep 22, 2015 at 1:19 PM, John Schulman [email protected]
|
I was just referring to serialization of instructions/execution graph. This shouldn't involve serializing binary data, right? |
The ReturnByRef and ReturnByVal instructions have to store the closure data for the Ops they're associated with. And a Constant Op has a value associated with it, so it'll be necessary to serialize the data. |
I have started implementing serialization for execution graphs here: https://github.com/hojonathanho/cgt/tree/serialization I chose a C++-only serialization framework because I think that with the current way things are set up, it's best for serialization/deserialization to happen in C++/Cython only -- we should never be constructing execution graphs in Python anyway. It's also a lot faster to not have to worry about cross-language compatibility, since we can effectively directly serialize the bits in structs. Let me know if you think this is the right way to go. |
Agreed that that it makes sense to serialize through in C++. But the closure data for the Ops is created in python. How do you plan to serialize each piece of closure data? |
Please add ability to run compiled with native backend CGT graph from C or C++ application.
Intended pipeline:
Thank you.
The text was updated successfully, but these errors were encountered: