[ 
https://issues.apache.org/jira/browse/BEAM-5617?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16664352#comment-16664352
 ] 

Valentyn Tymofieiev commented on BEAM-5617:
-------------------------------------------

A difference in behavior between Python 2 and Python 3 was observed in type 
inference, 
https://issues.apache.org/jira/browse/BEAM-5322?focusedCommentId=16663113&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-16663113.
 This difference is not critical. 

After a forcing more conservative type inference both in Py2 and Py3 
(https://github.com/tvalentyn/beam/blob/298b0b5899c55c670feaeb3369493d3f01d16e96/sdks/python/apache_beam/typehints/trivial_inference.py#L248)
 I observe that on Python 3 we use a different codepath in coders, for example 
https://github.com/apache/beam/blob/98533ad0bb3ff5ad4ecb5b71c4ca1837c756ce16/sdks/python/apache_beam/coders/coder_impl.py#L555
 is called on Python 3 but not in Python 2. Not sure yet what is the reason or 
how it impacts further execution.   

> Side inputs don't work on Python 3 
> -----------------------------------
>
>                 Key: BEAM-5617
>                 URL: https://issues.apache.org/jira/browse/BEAM-5617
>             Project: Beam
>          Issue Type: Sub-task
>          Components: sdk-py-core
>            Reporter: Valentyn Tymofieiev
>            Assignee: Valentyn Tymofieiev
>            Priority: Major
>          Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> ======================================================================
> ERROR: test_iterable_side_input 
> (apache_beam.transforms.sideinputs_test.SideInputsTest)
> ----------------------------------------------------------------------
> Traceback (most recent call last):
>   File 
> "/usr/local/google/home/valentyn/projects/beam/clean_head/beam/sdks/python/apache_beam/runners/common.py",
>  line 677, in process
>     self.do_fn_invoker.invoke_process(windowed_value)
>   File 
> "/usr/local/google/home/valentyn/projects/beam/clean_head/beam/sdks/python/apache_beam/runners/common.py",
>  line 414, in invoke_process
>     windowed_value, self.process_method(windowed_value.value))
>   File 
> "/usr/local/google/home/valentyn/projects/beam/clean_head/beam/sdks/python/apache_beam/transforms/core.py",
>  line 1068, in <lambda>
>     wrapper = lambda x: [fn(x)]
>   File 
> "/usr/local/google/home/valentyn/projects/beam/clean_head/beam/sdks/python/apache_beam/testing/util.py",
>  line 119, in _equal
>     'Failed assert: %r == %r' % (sorted_expected, sorted_actual))
> apache_beam.testing.util.BeamAssertException: Failed assert: [3, 4, 6, 8] == 
> []



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to