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

ENH Speed up sgdclassifier example plot_sgd_early_stopping.py #21627

Closed
wants to merge 5 commits into from

Conversation

johgreen
Copy link

Reference Issues/PRs

Speeding up ../examples/linear_model/plot_sgd_early_stopping.py in #21598

What does this implement/fix? Explain your changes.

Reduced n_samples from 10000 to 5000 to speed up runtime.

@ogrisel
Copy link
Member

ogrisel commented Nov 12, 2021

Can you please fix the code style to get the linting work in the CI status summary? Look at the logs of the failed CI jobs for details.

Please also report your analysis of the before/after of your proposed change:

  • observed runtime speed-up;
  • preservation of the results and conclusion of the example.

@adrinjalali adrinjalali changed the title speed up sgdclassifier plotting example speed up sgdclassifier plotting example plot_sgd_early_stopping.py Nov 12, 2021
@adrinjalali adrinjalali mentioned this pull request Nov 12, 2021
41 tasks
@TomDLT TomDLT changed the title speed up sgdclassifier plotting example plot_sgd_early_stopping.py ENH Speed up sgdclassifier example plot_sgd_early_stopping.py Nov 16, 2021
@adrinjalali
Copy link
Member

Interestingly, at least on the CI, this example doesn't run faster than what we have.

You also need to run black on your code as I said before @johgreen

@ogrisel
Copy link
Member

ogrisel commented Nov 19, 2021

I think this example might be completely reworked to be much more elegant and efficient once me make some progress on the callback API #16925 that itself is being worked on by @jeremiedbb.

@adrinjalali
Copy link
Member

I agree @ogrisel , but this cuts over 30s from the example, we can merge as is, and let @jeremiedbb rework the example as a part of the callback work. WDYT?

@adrinjalali adrinjalali self-assigned this Nov 30, 2021
@adrinjalali
Copy link
Member

ping @ogrisel

@adrinjalali
Copy link
Member

As is, this PR doesn't seem to change the speed of the example that much (33s vs 30s)

@glemaitre
Copy link
Member

Closing this PR since we have already tackled the problem (23s in main).

@glemaitre glemaitre closed this May 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants