You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "jorisvandenbossche (via GitHub)" <gi...@apache.org> on 2024/06/11 10:10:04 UTC

[PR] GH-41924: [Python] Fix tests when using NumPy 2.0 on Windows [arrow]

jorisvandenbossche opened a new pull request, #42099:
URL: https://github.com/apache/arrow/pull/42099

   ### Rationale for this change
   
   The tests are failing on windows when using numpy 2.0 RC, probably related to default integer bitwidth.
   
   ### What changes are included in this PR?
   
   <!--
   There is no need to duplicate the description in the issue here but it is sometimes worth providing a summary of the individual changes in this PR.
   -->
   
   ### Are these changes tested?
   
   <!--
   We typically require tests for all PRs in order to:
   1. Prevent the code from being accidentally broken by subsequent changes
   2. Serve as another way to document the expected behavior of the code
   
   If tests are not included in your PR, please explain why (for example, are they covered by existing tests)?
   -->
   
   ### Are there any user-facing changes?
   
   <!--
   If there are user-facing changes then we may require documentation to be updated before approving the PR.
   -->
   
   <!--
   If there are any breaking changes to public APIs, please uncomment the line below and explain which changes are breaking.
   -->
   <!-- **This PR includes breaking changes to public APIs.** -->
   
   <!--
   Please uncomment the line below (and provide explanation) if the changes fix either (a) a security vulnerability, (b) a bug that caused incorrect or invalid data to be produced, or (c) a bug that causes a crash (even when the API contract is upheld). We use this to highlight fixes to issues that may affect users without their knowledge. For this reason, fixing bugs that cause errors don't count, since those are usually obvious.
   -->
   <!-- **This PR contains a "Critical Fix".** -->


-- 
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@arrow.apache.org

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


Re: [PR] GH-41924: [Python] Fix tests when using NumPy 2.0 on Windows [arrow]

Posted by "h-vetinari (via GitHub)" <gi...@apache.org>.
h-vetinari commented on PR #42099:
URL: https://github.com/apache/arrow/pull/42099#issuecomment-2161622626

   Tested this in https://github.com/conda-forge/pyarrow-feedstock/pull/124, almost all failures are gone, except one:
   ```
   ================================== FAILURES ===================================
   _______________ TestConvertPrimitiveTypes.test_integer_no_nulls _______________
   
   self = <pyarrow.tests.test_pandas.TestConvertPrimitiveTypes object at 0x0000022C03165F50>
   
       def test_integer_no_nulls(self):
           data = OrderedDict()
           fields = []
       
           numpy_dtypes = [
               ('i1', pa.int8()), ('i2', pa.int16()),
               ('i4', pa.int32()), ('i8', pa.int64()),
               ('u1', pa.uint8()), ('u2', pa.uint16()),
               ('u4', pa.uint32()), ('u8', pa.uint64()),
               ('longlong', pa.int64()), ('ulonglong', pa.uint64())
           ]
           num_values = 100
       
           for dtype, arrow_dtype in numpy_dtypes:
               info = np.iinfo(dtype)
   >           values = np.random.randint(max(info.min, np.iinfo(np.int_).min),
                                          min(info.max, np.iinfo(np.int_).max),
                                          size=num_values)
   
   pyarrow\tests\test_pandas.py:770: 
   _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
   numpy\\random\\mtrand.pyx:796: in numpy.random.mtrand.RandomState.randint
       ???
   _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
   
   >   ???
   E   ValueError: low is out of bounds for int32
   
   numpy\\random\\_bounded_integers.pyx:1421: ValueError
   ```


-- 
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@arrow.apache.org

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


Re: [PR] GH-41924: [Python] Fix tests when using NumPy 2.0 on Windows [arrow]

Posted by "conbench-apache-arrow[bot] (via GitHub)" <gi...@apache.org>.
conbench-apache-arrow[bot] commented on PR #42099:
URL: https://github.com/apache/arrow/pull/42099#issuecomment-2167569096

   After merging your PR, Conbench analyzed the 6 benchmarking runs that have been run so far on merge-commit 680980e8bd70393e95f65fa880914aa6c32aedaa.
   
   There were no benchmark performance regressions. 🎉
   
   The [full Conbench report](https://github.com/apache/arrow/runs/26223484370) has more details. It also includes information about 8 possible false positives for unstable benchmarks that are known to sometimes produce them.


-- 
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@arrow.apache.org

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


Re: [PR] GH-41924: [Python] Fix tests when using NumPy 2.0 on Windows [arrow]

Posted by "h-vetinari (via GitHub)" <gi...@apache.org>.
h-vetinari commented on PR #42099:
URL: https://github.com/apache/arrow/pull/42099#issuecomment-2162393852

   With https://github.com/apache/arrow/pull/42099/commits/f2ac5c75ddd6c3bc8e9e737dad253701c39ed4a4, you'll also be fixing #41319 :)


-- 
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@arrow.apache.org

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


Re: [PR] GH-41924: [Python] Fix tests when using NumPy 2.0 on Windows [arrow]

Posted by "jorisvandenbossche (via GitHub)" <gi...@apache.org>.
jorisvandenbossche merged PR #42099:
URL: https://github.com/apache/arrow/pull/42099


-- 
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@arrow.apache.org

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


Re: [PR] GH-41924: [Python] Fix tests when using NumPy 2.0 on Windows [arrow]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #42099:
URL: https://github.com/apache/arrow/pull/42099#issuecomment-2160357312

   :warning: GitHub issue #41924 **has been automatically assigned in GitHub** to PR creator.


-- 
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@arrow.apache.org

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