Create op for reading a batch of rows.
(self, net)
| 40 | self._batch_size = batch_size |
| 41 | |
| 42 | def read(self, net): |
| 43 | """ |
| 44 | Create op for reading a batch of rows. |
| 45 | """ |
| 46 | blobs = net.TextFileReaderRead( |
| 47 | [self._reader], |
| 48 | len(self.schema().field_names()), |
| 49 | batch_size=self._batch_size) |
| 50 | if type(blobs) is core.BlobReference: |
| 51 | blobs = [blobs] |
| 52 | |
| 53 | is_empty = net.IsEmpty( |
| 54 | [blobs[0]], |
| 55 | core.ScopedBlobReference(net.NextName('should_stop')) |
| 56 | ) |
| 57 | |
| 58 | return (is_empty, blobs) |
nothing calls this directly
no test coverage detected