Skip to content

🔒 🤖 CI Update lock files for main CI build(s) 🔒 🤖 - #32902

Merged
ogrisel merged 8 commits into
scikit-learn:mainfrom
scikit-learn-bot:auto-update-lock-files-main
Jan 8, 2026
Merged

ogrisel merged 8 commits into
scikit-learn:mainfrom
scikit-learn-bot:auto-update-lock-files-main

Conversation

@scikit-learn-bot

Copy link
Copy Markdown
Contributor

Update lock files.

Note

If the CI tasks fail, create a new branch based on this PR and add the required fixes to that branch.

@ogrisel

ogrisel commented Dec 22, 2025

Copy link
Copy Markdown
Member

The Python process in the circle CI run was killed when running the plot_scalable_poly_kernels.py example:

make: *** [Makefile:74: html] Killed/kernel_approximation... [100%] plot_scalable_poly_kernels.py

@ogrisel

ogrisel commented Dec 22, 2025

Copy link
Copy Markdown
Member

Let me re-run the failed job to see if it's deterministic or not. Maybe memory usage was too close to some host limit?

@ogrisel

ogrisel commented Dec 22, 2025

Copy link
Copy Markdown
Member

The crash seems to be deterministic and related to the package updates in this PR.

@lesteve

lesteve commented Dec 22, 2025

Copy link
Copy Markdown
Member

Hard to tell what is going on from the log. The resources tab doesn't help much.

Looks like it is getting killed somehow see Killed below. Exited with code exit status 2 doesn't help much.

generating gallery for auto_examples/mixture... [100%] plot_gmm_sin.py
generating gallery for auto_examples/gaussian_process... [100%] plot_gpc.py
generating gallery for auto_examples/linear_model... [100%] plot_tweedie_regression_insurance_claims.py
generating gallery for auto_examples/inspection... [100%] plot_permutation_importance_multicollinear.py
make: *** [Makefile:74: html] Killed/kernel_approximation... [100%] plot_scalable_poly_kernels.py
/home/circleci/miniforge3/envs/testenv/lib/python3.11/site-packages/joblib/externals/loky/backend/resource_tracker.py:359: UserWarning: resource_tracker: There appear to be 8 leaked semlock objects to clean up at shutdown
  warnings.warn(
/home/circleci/miniforge3/envs/testenv/lib/python3.11/site-packages/joblib/externals/loky/backend/resource_tracker.py:359: UserWarning: resource_tracker: There appear to be 1358 leaked folder objects to clean up at shutdown
  warnings.warn(

Exited with code exit status 2

@ogrisel

ogrisel commented Dec 22, 2025

Copy link
Copy Markdown
Member

The enabling of faulthandler did not help report any extra info. Let me try to tweak the example to check if we can reduce the peak memory usage in case the problem comes from the OS OOM killer.

@ogrisel

ogrisel commented Dec 22, 2025 •

Copy link
Copy Markdown
Member

Ok, as I suspected, memory usage was the problem. I ran memory profiler (mprof run script.py / mprof plot) and with n_components=2000 the peak memory usage was close to 3 GB on my laptop.

I think we were already borderline in memory usage, and maybe some imported libraries are now slightly larger than they used to be and cause this example to exceed the limit of the circle CI host on this example.

Here are the plots generated by the changed example:

  • on main:
image
  • on this branch:
image

I think the message of the example remains the same with max(N_COMPONENTS) == 1500.

Also note that there is some variability when re-running this examples multiple times. In some runs, it's easier to see diminishing returns with large values of n_components.

@ogrisel ogrisel left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM. @lesteve feel free to merge if you like it.

Comment thread build_tools/circle/build_doc.sh Outdated
ccache -s

export OMP_NUM_THREADS=1
export PYTHONFAULTHANDLER=1

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think we can keep this as it might be useful in the future even if it did not help for this particular case.

@lesteve

lesteve commented Dec 23, 2025 •

Copy link
Copy Markdown
Member

My feeling is that something is weird, so I would not merge this as is and wait to see if it disappears by itself (next Monday this PR will be recreated from scratch).

The memory consumption between main and this PR looks different looking at the CircleCI resources tab. Hard to tell without doing trial and error what is the culprit (numpy 2.4, cython 3.2.3, libgomp build number bump, ...).

Memory consumption from successful build (after setting max(N_COMPONENTS) == 1500)
image

Memory consumption in main. There is a bit of variation between runs see run 1, run 2, run 3, run 4
image

Something I realized when debugging by SSH is that OpenMP sees 36 cores on the CircleCI VM (from sklearn.show_versions()) but this may be unrelated to the problem here.

@ogrisel

ogrisel commented Dec 23, 2025

Copy link
Copy Markdown
Member

Something I realized when debugging by SSH is that OpenMP sees 36 cores on the CircleCI VM (from sklearn.show_versions()) but this may be unrelated to the problem here.

This is a known problem of openmp runtimes, they ignore cgroups CPU quotas. But we set an env variable explicitly in the build doc script.

@ogrisel ogrisel left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Changing my review status: let's wait for a week or two and see if the problem goes away by itself. Otherwise we will have to investigate to find the package causing the regression in memory usage.

@lesteve

lesteve commented Dec 30, 2025

Copy link
Copy Markdown
Member

On December 29, the doc build memory usage issue is still there see build log

@scikit-learn-bot
scikit-learn-bot force-pushed the auto-update-lock-files-main branch from 4cbfbd6 to 0d007a6 Compare January 5, 2026 05:16
@ogrisel

ogrisel commented Jan 5, 2026 •

Copy link
Copy Markdown
Member

Todays' doc build run (2026-01-05) could not complete because of #32961, but it seems that memory usage is still very close to the limit (and closer than it used to be):

image

@ogrisel

ogrisel commented Jan 7, 2026

Copy link
Copy Markdown
Member

I updated the doc dependencies again to check if the memory usage is still high.

@ogrisel

ogrisel commented Jan 7, 2026 •

Copy link
Copy Markdown
Member

This PR still has the crash:

make: *** [Makefile:74: html] Killed/kernel_approximation... [100%] plot_scalable_poly_kernels.py

Note that my previous change to this example file has been forced-pushed away by last Monday's bot push.

Weirdly enough, the RAM usage after 20 min (before the crash) wasn't that large on this run. Peak usage was around 75% before the crash which seems somewhat similar to what we get on main. So maybe the memory usage regression is related to that particular example.

image

EDIT: actually on main RAM usage is hovering around 50% of 4GB most of the time before the 20 min mark instead of 70% for that build, so there is a general RAM usage regression somewhere.

@ogrisel

ogrisel commented Jan 7, 2026

Copy link
Copy Markdown
Member

I pushed again the change in examples/kernel_approximation/plot_scalable_poly_kernels.py to reduce the number of components while preserving the core message of the example.

In parallel, I had another look at the dependencies that got updated in the doc build but it's hard to pinpoint the potential culprit.

@lesteve

lesteve commented Jan 7, 2026

Copy link
Copy Markdown
Member

Looks like it is failing at another example now 😱 build log

make: *** [Makefile:74: html] Killed/miscellaneous... [ 40%] plot_outlier_detection_bench.py

I think there is something fishy going on but at the same time I am not 100% sure we should spend too much time investigating it 🤷.

One possible way out would be to use a bigger CircleCI runner. mne-python use a Large one for example with 8GB of RAM.

@ogrisel ogrisel left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM, thanks @lesteve. Let's merge to unlock the numpydoc PR.

@ogrisel
ogrisel merged commit 017c91d into scikit-learn:main Jan 8, 2026
dschult pushed a commit to dschult/scikit-learn that referenced this pull request Jan 25, 2026
Co-authored-by: Lock file bot <[email protected]>
Co-authored-by: Olivier Grisel <[email protected]>
Co-authored-by: Loïc Estève <[email protected]>
dschult pushed a commit to dschult/scikit-learn that referenced this pull request Jan 25, 2026
Co-authored-by: Lock file bot <[email protected]>
Co-authored-by: Olivier Grisel <[email protected]>
Co-authored-by: Loïc Estève <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants