-
Notifications
You must be signed in to change notification settings - Fork 429
Contributing TFRecordWriter and TFExampleParser #162
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 like the idea, and I appreciate asking for direction before submitting a pull request. I have a few questions; please don't be scared off. :) In response to your questions:
Would this introduce additional dependencies? If this requires a protobuf implementation, we would want to be careful to choose the right crate. Likewise if there are any file format dependencies. Does this include something like an @jhseu Do you know if record/example IO will ever be provided via the C API? |
Yes, RecordWriter is pure Rust. Its deps are As for creating Examples, mine are serialized using the Regardless of whether we wrap the gencode API, I think that |
We won't have a C API for RecordWriter. The (uncompressed) implementation is simple enough that there isn't really a need. We already have a separate Java implementation in the ecosystem repository. I would suggest that you design it so that it's orthogonal to tf.Examples. From a TensorFlow perspective, we support reading any arbitrary strings out of RecordWriter, so the interface should just be about reading and writing bytes. |
That sounds good. @masonk Would you might sending an initial pull request just for the RecordWriter with support for writing strings, leaving out Example support? Once that's sorted we can hash out the details for Examples. |
Sounds good. I think I'll get to it this weekend. |
Would you like ExampleWriter, too? |
Yes, but I'd like a little more detail first so we can make sure we're on the same page. Which crate(s) would you add? What exactly would the public API be? |
I haven't thought it through yet, but before I do any coding, I'll write up
a small design doc and post it --- here? Or another issue?
…On Sun, May 20, 2018 at 7:54 PM, Adam Crume ***@***.***> wrote:
Yes, but I'd like a little more detail first so we can make sure we're on
the same page. Which crate(s) would you add? What exactly would the public
API be?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#162 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAbdznHhQ0APcyCLuYFtT1QpgeXmyW9-ks5t0iyCgaJpZM4T8pd4>
.
|
Sounds good. Here's fine. |
One question, do we have APIs in Rust to read TFRecords? 🤔 |
I never submitted a record reader, and I don't see one in the repo right now. It would be good to have one, though. |
I revisited this today to remember why I never submitted a reader. Here's what I remember:
|
Pull request for a basic reader |
Interesting, thanks for the fast response, that is a lot of info to take in. Perhaps just another question so far. The first case I am using Rust to read TFRecord is probably on the serving side. As we will have some features ready in places like BigTable and when providing a user id on the backend we will get a single feature row for that user, in TRRecord formmat. I am thinking about using Rust to build a backend to host the model and take in the TFRecord (one row) and return a model prediction to the caller. I think with your PR #240 this can also be achieved? :) |
Yes, it should be plenty for that. |
Uh oh!
There was an error while loading. Please reload this page.
In my own project, I am using Rust to write TFRecords full of TFExamples to disk.
The code for doing this is something that might be useful to many projects that import the
tensorflow
crate, and I'd like to submit a PR for these utils.However, it would be nice to have an agreement from package maintainers on the specifics of the design before I code up the CL. To give an example of outstanding questions:
RecordWriter
and/orExampleWriter
in this crate?tensorflow::io
?src/io.rs
?The text was updated successfully, but these errors were encountered: