scikit-learn-extra icon indicating copy to clipboard operation
scikit-learn-extra copied to clipboard

Make examples faster

Open rth opened this issue 5 years ago • 2 comments

Currently some examples takes quite a while to run, which is problematic as we are running them with sphinx-gallery (documentation CI job) in each commit.

In particular,

  • examples/plot_robust_classification_diabete.py : 40s
  • examples/plot_robust_regression_california_houses.py: 1min
  • examples/plot_clustering.py: 27s

on a recent CPU. In Circle CI building teh documentation takes 18min, mostly due to examples.

It would be good to make them faster, for instance by subsampling the dataset used in the example.

cc @TimotheeMathieu

rth avatar Nov 07 '20 12:11 rth

Ok I'm on it.
A major problem is that I did not implement a stopping criterion in the robust algorithms hence the algo is unnecessarily long. I will think about which criterion to implement and maybe look at examples in scikit learn (i.e. stopping criterion for SGD in sklearn).

TimotheeMathieu avatar Nov 08 '20 13:11 TimotheeMathieu

Now, Circle CI takes less than 4min. It seems ok to me.

TimotheeMathieu avatar Nov 16 '20 15:11 TimotheeMathieu