Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI: Unpin NumPy #23465

Merged
merged 5 commits into from
Nov 6, 2018
Merged

CI: Unpin NumPy #23465

merged 5 commits into from
Nov 6, 2018

Conversation

TomAugspurger
Copy link
Contributor

Closes #23172

@pep8speaks
Copy link

Hello @TomAugspurger! Thanks for submitting the PR.

@TomAugspurger TomAugspurger added the CI Continuous Integration label Nov 2, 2018
@TomAugspurger TomAugspurger added this to the 0.24.0 milestone Nov 2, 2018
@jbrockmendel
Copy link
Member

jbrockmendel commented Nov 3, 2018

Scipy import error on travis

@codecov
Copy link

codecov bot commented Nov 5, 2018

Codecov Report

Merging #23465 into master will increase coverage by 0.02%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #23465      +/-   ##
==========================================
+ Coverage   92.23%   92.25%   +0.02%     
==========================================
  Files         161      161              
  Lines       51197    51176      -21     
==========================================
- Hits        47220    47214       -6     
+ Misses       3977     3962      -15
Flag Coverage Δ
#multiple 90.64% <100%> (+0.02%) ⬆️
#single 42.28% <33.33%> (+0.01%) ⬆️
Impacted Files Coverage Δ
pandas/util/_test_decorators.py 93.24% <100%> (ø) ⬆️
pandas/core/groupby/generic.py 87.04% <100%> (ø) ⬆️
pandas/io/parquet.py 83.5% <0%> (+9.77%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0bb24b7...3f84fb0. Read the comment docs.

@TomAugspurger
Copy link
Contributor Author

I don't really understand the scipy failure. I can't reproduce it locally right now.

I pushed another commit to see if it fails again.

@TomAugspurger TomAugspurger changed the title CI: Unpin NumPy [WIP]CI: Unpin NumPy Nov 5, 2018
This reverts commit e5eab3d.
@TomAugspurger
Copy link
Contributor Author

OK, able to reproduce locally (on a Mac) with the latest wheels from https://7933911d6844c6c53a7d-47bd50c35cd79bd838daf386af554a83.ssl.cf2.rackcdn.com:

$ python -W error
Python 3.7.0 (default, Sep 18 2018, 18:47:22)
[Clang 9.1.0 (clang-902.0.39.2)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import scipy.signal
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/taugspurger/Envs/pandas-dev/lib/python3.7/site-packages/scipy/signal/__init__.py", line 322, in <module>
    from .filter_design import *
  File "/Users/taugspurger/Envs/pandas-dev/lib/python3.7/site-packages/scipy/signal/filter_design.py", line 18, in <module>
    from scipy import special, optimize, fftpack
  File "/Users/taugspurger/Envs/pandas-dev/lib/python3.7/site-packages/scipy/optimize/__init__.py", line 369, in <module>
    from ._minimize import *
  File "/Users/taugspurger/Envs/pandas-dev/lib/python3.7/site-packages/scipy/optimize/_minimize.py", line 30, in <module>
    from ._trustregion_krylov import _minimize_trust_krylov
  File "/Users/taugspurger/Envs/pandas-dev/lib/python3.7/site-packages/scipy/optimize/_trustregion_krylov.py", line 2, in <module>
    from ._trlib import (get_trlib_quadratic_subproblem)
  File "/Users/taugspurger/Envs/pandas-dev/lib/python3.7/site-packages/scipy/optimize/_trlib/__init__.py", line 1, in <module>
    from ._trlib import TRLIBQuadraticSubproblem
  File "messagestream.pxd", line 5, in init scipy.optimize._trlib._trlib
  File "messagestream.pyx", line 5, in init scipy._lib.messagestream
ImportWarning: can't resolve package from __spec__ or __package__, falling back on __name__ and __path__

>>> import numpy
>>> import scipy
>>> numpy.__version__
'1.16.0.dev0+9cc9f01'
>>> scipy.__version__
'1.2.0.dev0+016a6ef'

@rgommers do you know where the configuration for the scipy wheels uploaded to https://7933911d6844c6c53a7d-47bd50c35cd79bd838daf386af554a83.ssl.cf2.rackcdn.com lives? Or do you know offhand what versionsof NumPy and Cython those are compiled with?

@TomAugspurger TomAugspurger changed the title [WIP]CI: Unpin NumPy CI: Unpin NumPy Nov 5, 2018
return not (safe_import('scipy.stats') and
safe_import('scipy.sparse') and
safe_import('scipy.interpolate') and
safe_import('scipy.signal'))
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not entirely sure why, but importing here should avoid the test failure. I suspect that whatever modifications pytest makes to the warningsfilter isn't active at this point (in the fixture), so the warning about the dtype size changing isn't elevated to an error.

setup.cfg Show resolved Hide resolved
@rgommers
Copy link
Contributor

rgommers commented Nov 5, 2018

@rgommers do you know where the configuration for the scipy wheels uploaded to https://7933911d6844c6c53a7d-47bd50c35cd79bd838daf386af554a83.ssl.cf2.rackcdn.com lives? Or do you know offhand what versionsof NumPy and Cython those are compiled with?

That should be https://github.com/MacPython/scipy-wheels#how-it-works. Haven't checked, but it should be using the lowest supported NumPy version (same as for official releases, for ABI compatibility). Cython version will all be the same, not sure which version (check CI scripts).

@TomAugspurger
Copy link
Contributor Author

Thanks for the pointer.

From https://travis-ci.org/MacPython/scipy-wheels/jobs/432291485, it seems like Cython 0.26.1 and NumPy 1.14.5 are used.

And FWIW, I get the same warning / error with from python -W error -c "import scipy.signal" using the currently released versions of NumPy & SciPy as I do with the dev versions, so I'll just assume that's expected for now (though I think Cython 0.29 fixed this).

@TomAugspurger
Copy link
Contributor Author

@jreback if you have any thoughts, otherwise I'll merge tomorrow morning so we're testing against numpy master again.

@jreback
Copy link
Contributor

jreback commented Nov 6, 2018

lgtm.

@@ -410,7 +410,9 @@ def first_not_none(values):
if (isinstance(v.index, MultiIndex) or
key_index is None or
isinstance(key_index, MultiIndex)):
stacked_values = np.vstack(map(np.asarray, values))
stacked_values = np.vstack([
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In case you didn't follow the issue, the original failure came from us passing generator expressions to vstack, and the new __array_function__ stuff in NumPy dev exhausted those generators. So we just build a list instead (which NumPy was doing anyway)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yep saw that

@jreback jreback merged commit 02abc73 into pandas-dev:master Nov 6, 2018
@jreback
Copy link
Contributor

jreback commented Nov 6, 2018

thanks!

JustinZhengBC pushed a commit to JustinZhengBC/pandas that referenced this pull request Nov 14, 2018
tm9k1 pushed a commit to tm9k1/pandas that referenced this pull request Nov 19, 2018
Pingviinituutti pushed a commit to Pingviinituutti/pandas that referenced this pull request Feb 28, 2019
Pingviinituutti pushed a commit to Pingviinituutti/pandas that referenced this pull request Feb 28, 2019
@TomAugspurger TomAugspurger deleted the unpin-numpydev branch December 17, 2019 21:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI Continuous Integration
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants