[
https://issues.apache.org/jira/browse/BEAM-5879?focusedWorklogId=163159&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-163159
]
ASF GitHub Bot logged work on BEAM-5879:
----------------------------------------
Author: ASF GitHub Bot
Created on: 06/Nov/18 19:00
Start Date: 06/Nov/18 19:00
Worklog Time Spent: 10m
Work Description: tvalentyn commented on a change in pull request #6953:
[BEAM-5879 ] Make write_record() in tfrecordio.py py3 compatible
URL: https://github.com/apache/beam/pull/6953#discussion_r231250118
##########
File path: sdks/python/apache_beam/io/tfrecordio.py
##########
@@ -96,11 +99,12 @@ def write_record(cls, file_handle, value):
value: A string content of the record.
"""
encoded_length = struct.pack('<Q', len(value))
Review comment:
I think we need to take a closer look at this IO regarding `str` vs `bytes`:
- we may want to compute encoded_length after `value` is encoded to bytes.
- we need to clarify in the docstring what type is returned as a result of
`read_record` and what type is expected as argument to `encoded_num_bytes`.
- we should also have unicode strings in tfrecordio_test.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 163159)
Time Spent: 1h 20m (was: 1h 10m)
> TFRecordio not Py3 compatible
> -----------------------------
>
> Key: BEAM-5879
> URL: https://issues.apache.org/jira/browse/BEAM-5879
> Project: Beam
> Issue Type: Sub-task
> Components: sdk-py-core
> Environment: python 3.5
> Reporter: Ruoyu Liu
> Priority: Major
> Time Spent: 1h 20m
> Remaining Estimate: 0h
>
> Error when trying to write to file. Initial issue in line 103 in
> io/tfrecordio.py, after making the content to bytes, there will be
> segmentation fault when reading.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)