-
-
Notifications
You must be signed in to change notification settings - Fork 18.2k
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
TST: make tests involving use_numexpr more robust #44601
TST: make tests involving use_numexpr more robust #44601
Conversation
Does anybody know how you can get |
Just a guess: maybe specifying |
Apparently not running the tests in parallel does it as well. |
Now, what have I learned up to now:
|
So it is this test that changes the USE_NUMEXPR value: @td.skip_if_no_ne
@pytest.mark.parametrize(
("use_numexpr", "expected"),
(
(True, "numexpr"),
(False, "python"),
),
)
def test_numexpr_option_respected(use_numexpr, expected):
# GH 32556
from pandas.core.computation.eval import _check_engine
with pd.option_context("compute.use_numexpr", use_numexpr):
result = _check_engine(None)
assert result == expected From the log:
For some reason, the |
Going trough our tests, I don't see any place where we use We have only one other CI env that includes dask, and that is |
Oh boy, this is such a mess: In [4]: from pandas.core.computation import expressions as expr
In [5]: expr.USE_NUMEXPR
Out[5]: True
In [6]: pd.set_option("compute.use_numexpr", False)
In [7]: expr.USE_NUMEXPR
Out[7]: False
In [8]: expr.set_use_numexpr(True)
In [9]: expr.USE_NUMEXPR
Out[9]: True
In [10]: pd.get_option("compute.use_numexpr")
Out[10]: False
In [11]: with pd.option_context("compute.use_numexpr", True):
...: pass
...:
In [12]: expr.USE_NUMEXPR
Out[12]: False So setting the option through |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm (and prob should make an issue in the dask side to use the option itself)
this is testing only or do we think there is an actual problem in user code? |
No, this is only our testing. Dask is actually using the public option. |
It was the mixed usage of the public option ( |
There have been some failures recently in the "Test experimental data manager (not slow and not network and not clipboard)" build.