You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by "samuela (via GitHub)" <gi...@apache.org> on 2023/03/27 23:00:51 UTC

[GitHub] [beam] samuela opened a new issue, #26004: [Failing Test]: `RowCoderTest.test_batch_encode_decode` failure: `setting an array element with a sequence. The requested array has an inhomogeneous shape after 1 dimensions.`

samuela opened a new issue, #26004:
URL: https://github.com/apache/beam/issues/26004

   ### What happened?
   
   ```
   ____________________ RowCoderTest.test_batch_encode_decode _____________________
   [gw0] linux -- Python 3.10.10 /nix/store/syz2y6j53y5hpzbs7l0965zwxshi8iyl-python3-3.10.10/bin/python3.10
   
   self = <apache_beam.coders.row_coder_test.RowCoderTest testMethod=test_batch_encode_decode>
   
       def test_batch_encode_decode(self):
         coder = RowCoder(typing_to_runner_api(Person).row_type.schema).get_impl()
         seq_out = coder_impl.create_OutputStream()
         for person in self.PEOPLE:
           coder.encode_to_stream(person, seq_out, False)
   
         batch_out = coder_impl.create_OutputStream()
   >     columnar = {
             field: np.array([getattr(person, field) for person in self.PEOPLE],
                             ndmin=1)
             for field in Person._fields
         }
   
   apache_beam/coders/row_coder_test.py:418:
   _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
   
   .0 = <tuple_iterator object at 0x7ffead1953c0>
   
       columnar = {
   >       field: np.array([getattr(person, field) for person in self.PEOPLE],
                           ndmin=1)
           for field in Person._fields
       }
   E   ValueError: setting an array element with a sequence. The requested array has an inhomogeneous shape after 1 dimensions. The detected shape was (3,) + inhomogeneous part.
   
   apache_beam/coders/row_coder_test.py:419: ValueError
   ```
   
   I'm guessing that this is due to the numpy version: 1.24.2. This is running the Python test suite on beam version v2.45.0.
   
   ### Issue Failure
   
   Failure: Test is continually failing
   
   ### Issue Priority
   
   Priority: 1 (unhealthy code / failing or flaky postcommit so we cannot be sure the product is healthy)
   
   ### Issue Components
   
   - [X] Component: Python SDK
   - [ ] Component: Java SDK
   - [ ] Component: Go SDK
   - [ ] Component: Typescript SDK
   - [ ] Component: IO connector
   - [ ] Component: Beam examples
   - [ ] Component: Beam playground
   - [ ] Component: Beam katas
   - [ ] Component: Website
   - [ ] Component: Spark Runner
   - [ ] Component: Flink Runner
   - [ ] Component: Samza Runner
   - [ ] Component: Twister2 Runner
   - [ ] Component: Hazelcast Jet Runner
   - [ ] Component: Google Cloud Dataflow Runner


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [beam] tvalentyn closed issue #26004: [Failing Test]: `RowCoderTest.test_batch_encode_decode` failure: `setting an array element with a sequence. The requested array has an inhomogeneous shape after 1 dimensions.`

Posted by "tvalentyn (via GitHub)" <gi...@apache.org>.
tvalentyn closed issue #26004: [Failing Test]: `RowCoderTest.test_batch_encode_decode` failure: `setting an array element with a sequence. The requested array has an inhomogeneous shape after 1 dimensions.`
URL: https://github.com/apache/beam/issues/26004


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [beam] samuela commented on issue #26004: [Failing Test]: `RowCoderTest.test_batch_encode_decode` failure: `setting an array element with a sequence. The requested array has an inhomogeneous shape after 1 dimensions.`

Posted by "samuela (via GitHub)" <gi...@apache.org>.
samuela commented on issue #26004:
URL: https://github.com/apache/beam/issues/26004#issuecomment-1487482557

   Ah gotcha, thanks @tvalentyn !


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [beam] tvalentyn commented on issue #26004: [Failing Test]: `RowCoderTest.test_batch_encode_decode` failure: `setting an array element with a sequence. The requested array has an inhomogeneous shape after 1 dimensions.`

Posted by "tvalentyn (via GitHub)" <gi...@apache.org>.
tvalentyn commented on issue #26004:
URL: https://github.com/apache/beam/issues/26004#issuecomment-1486150550

   Thanks for reporting the issue. I am not seeing this test failing at master:
   
   https://ci-beam.apache.org/job/beam_PreCommit_Python_Cron/
   https://github.com/apache/beam/actions/workflows/python_tests.yml
   
   Note that Beam  2.45.0 is not compatible with numpy==1.24.2. You should use Beam 2.46.0 or newer, see:
   
   https://github.com/apache/beam/blob/fef98f7597f11aaa93388d547f58bf0482ed74f0/sdks/python/setup.py#L249 and https://github.com/apache/beam/pull/24725.
   
   Given the above, I am closing this issue, but feel free to reopen if you disagree with my assessment.
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org