You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
⚠️ CI failed on Linux_free_threaded.pylatest_pip_free_threaded (last failure: Jun 14, 2024) ⚠️ #29253
This might be a seed sensitivity problem of this test. We need to see if we can reproduce with other Python versions / platforms.
The error is:
deftest_minibatch_sensible_reassign(global_random_seed):
# check that identical initial clusters are reassigned# also a regression test for when there are more desired reassignments than# samples.zeroed_X, true_labels=make_blobs(
n_samples=100, centers=5, random_state=global_random_seed
)
zeroed_X[::2, :] =0km=MiniBatchKMeans(
n_clusters=20, batch_size=10, random_state=global_random_seed, init="random"
).fit(zeroed_X)
# there should not be too many exact zero cluster centers>assertkm.cluster_centers_.any(axis=1).sum() >10EAssertionError
any idea why pytest's AssertionError no longer display the values of the two expressions on each side of an binary operator?
Not sure about why pytest does not manage to give more information about the AssertionError ... same thing happens on vanilla Python in our CI e.g. this build log
but I cannot reproduce the assertion failure after several runs including when using pytest-xdist for different concurrency-induced non-deterministic execution patterns.
I had a look at the test and the threshold of 10 non-reassignments (over 20 clusters) does not seem particularly well justified.
However, by adding print statements on my local machines I consistently see values in the 14-19 range, so there might still be a platform-specific discrepancy that could explain reaching 10.
Still we might want to move the threshold to 8 instead of 10 to silence this failure (potentially at the cost of making this test a bit too weak).
I can not reproduce either locally even using a lock-file to try to be as close as possible to the CI.
I do manage to reproduce in the CI, see #29278. I really don't get it, I changed the code to have more information but the error message with the assertion is not reflecting this 😱. I got it it, rookie mistake on my part 😅.
And I think that the reason why there is not more info in the assertion message is because of an issue with Pytest assertion rewriting with editable install 🤕, maybe pytest-dev/pytest#11783 but I don't think so ...
This may also be a quirk of meson editable installs, not sure ...
What I have checked is that a Meson non-editable install works with Pytest assertion rewriting, a meson editable install does not.
Activity
ogrisel commentedon Jun 14, 2024
This might be a seed sensitivity problem of this test. We need to see if we can reproduce with other Python versions / platforms.
The error is:
any idea why pytest's
AssertionErrorno longer display the values of the two expressions on each side of an binary operator?lesteve commentedon Jun 14, 2024
The
test_minibatch_sensible_reassignfailure has been seen in other CI builds #27967 (comment) or #26802 (comment)Not sure about why pytest does not manage to give more information about the
AssertionError... same thing happens on vanilla Python in our CI e.g. this build logogrisel commentedon Jun 14, 2024
I tried to reproduce locally with either openblas or accelerate:
but I cannot reproduce the assertion failure after several runs including when using
pytest-xdistfor different concurrency-induced non-deterministic execution patterns.scikit-learn-bot commentedon Jun 15, 2024
CI is no longer failing! ✅
Successful run on Jun 20, 2024
ogrisel commentedon Jun 17, 2024
I had a look at the test and the threshold of 10 non-reassignments (over 20 clusters) does not seem particularly well justified.
However, by adding print statements on my local machines I consistently see values in the 14-19 range, so there might still be a platform-specific discrepancy that could explain reaching 10.
Still we might want to move the threshold to 8 instead of 10 to silence this failure (potentially at the cost of making this test a bit too weak).
lesteve commentedon Jun 17, 2024
I can not reproduce either locally even using a lock-file to try to be as close as possible to the CI.
I do manage to reproduce in the CI, see #29278.
I really don't get it, I changed the code to have more information but the error message with the assertion is not reflecting this 😱.I got it it, rookie mistake on my part 😅.lesteve commentedon Jun 17, 2024
And I think that the reason why there is not more info in the assertion message is because of an issue with Pytest assertion rewriting with editable install 🤕, maybe pytest-dev/pytest#11783 but I don't think so ...
This may also be a quirk of meson editable installs, not sure ...
What I have checked is that a Meson non-editable install works with Pytest assertion rewriting, a meson editable install does not.
lesteve commentedon Jul 3, 2024
FYI I ended up opening an issue about Pytest assertion rewriting and meson ediable install in mesonbuild/meson-python#646