Skip to content

Fix warnings in examples #14117

Closed
Closed

Description

@adrinjalali

Here's a list of examples which raise some warnings in master:

(updated Jan 2020)

  • examples/neural_networks/plot_mnist_filters.py (ConvergenceWarning)
  • examples/impute/plot_iterative_imputer_variants_comparison.py (ConvergenceWarning + FutureWarning)
  • examples/neural_networks/plot_mlp_alpha.py (ConvergenceWarning)
  • examples/plot_partial_dependence_visualization_api.py (FutureWarning)
  • examples/applications/wikipedia_principal_eigenvector.py (:77: DeprecationWarning: The 'cachedir' parameter has been deprecated in version 0.12 and will be removed in version 0.14.
    You provided "cachedir='.'", use "location='.'" instead.
    memory = Memory(cachedir="."))
  • examples/neighbors/approximate_nearest_neighbors.py (UserWarning: Version 1 of dataset MNIST is inactive, meaning that issues have been found in the dataset. Try using a newer version from this URL: https://www.openml.org/data/v1/download/18689782/MNIST.arff)

Activity

  1. thomasjuma commented on Jun 22, 2019

    @thomasjuma

    Working on "examples/linear_model/plot_omp.py"

  2. KenitoInc commented on Jun 22, 2019

    @KenitoInc
    Contributor

    @thomasbshop I have already pushed a PR for that

  3. KenitoInc commented on Jun 22, 2019

    @KenitoInc
    Contributor

    I am working to Fix warnings on examples/preprocessing/plot_map_data_to_normal.py

  4. rodneyosodo commented on Jun 22, 2019

    @rodneyosodo
    Contributor

    I am working on Fix warnings in examples #14117 examples/neighbors/plot_nca_illustration.py

  5. robinkiplangat commented on Jun 22, 2019

    @robinkiplangat

    I am working on Fix warnings in examples - examples/preprocessing/plot_map_data_to_normal.py

  6. KenitoInc commented on Jun 22, 2019

    @KenitoInc
    Contributor

    I am working on Fix warnings in examples - examples/preprocessing/plot_map_data_to_normal.py

    I have done a PR on this already. Check the thread above

  7. KenitoInc commented on Jun 22, 2019

    @KenitoInc
    Contributor
  8. GideonSonoiya1 commented on Jun 22, 2019

    @GideonSonoiya1
    Contributor

    examples/gaussian_process/plot_gpr_prior_posterior.py
    Issue is actually a complex issues based on the mathematical process as the variance of a data set can not result in a negative value

  9. rodneyosodo commented on Jun 22, 2019

    @rodneyosodo
    Contributor

    Can someone update the list for the issues that are still available

  10. rodneyosodo commented on Jun 22, 2019

    @rodneyosodo
    Contributor

    I am working on Fix warnings in examples #14117 examples/decomposition/plot_faces_decomposition.py

  11. KenitoInc commented on Jun 22, 2019

    @KenitoInc
    Contributor

    I am fixing examples/manifold/plot_lle_digits.py

  12. added a commit that references this issue on Jun 22, 2019
  13. martinoywa commented on Jun 24, 2019

    @martinoywa
    Contributor

    Is it possible for us to get an updated list?

  14. adrinjalali commented on Jun 25, 2019

    @adrinjalali
    MemberAuthor

    @martinoywa I updated the list to mark the ones which are fixed. But there are a few open PRs, which you need to check yourself and see which examples they're trying to fix :)

  15. 6 remaining items

  16. rcwoolston commented on Jul 13, 2019

    @rcwoolston
    Contributor

    Next up for me: examples/plot_johnson_lindenstrauss_bound.py

  17. deniederhut commented on Jul 13, 2019

    @deniederhut
    Contributor

    👀 woah, is that all of them?

  18. amueller commented on Jul 13, 2019

    @amueller
    Member

    If you're looking for a new checklist there's one here: #14312 ;)
    But it's also important to get these actually merged, I'll start reviewing

  19. rth commented on Jul 24, 2019

    @rth
    Member

    Just wanted to mention that IMO warnings should not be removed from examples at all cost. Sometimes it's OK to have warnings in examples.

    For instance, if a given warnings yields a ConvergenceWarning and it's difficult to address it either by increasing the number or iterations or the tolerance (assuming that could happen), I would rather it was left there as an illustration that the model hasn't converged than filtered out with warning filters.

  20. adrinjalali commented on Jul 24, 2019

    @adrinjalali
    MemberAuthor

    For instance, if a given warnings yields a ConvergenceWarning and it's difficult to address it either by increasing the number or iterations or the tolerance (assuming that could happen), I would rather it was left there as an illustration that the model hasn't converged than filtered out with warning filters.

    That's why I want the very specific warnings to be caught and not all of them. The user would then realize that the model is not converging if the warning is caught and there's a comment in the code. I don't think the purpose of any of the examples we have is to show that some models don't converge. The fact that they don't, is a side effect, not the purpose of the example. Also, ideally we'd actually fail on warnings in the CI, so that we don't explode on warnings every now and then as we usually do.

  21. rth commented on Jul 24, 2019

    @rth
    Member

    I don't think the purpose of any of the examples we have is to show that some models don't converge. The fact that they don't, is a side effect, not the purpose of the example.

    No, but some models don't converge in real applications. I'm not sure that hiding from users what it would look like is preferable.

    if the warning is caught and there's a comment in the code.

    In what way is that better than just leaving the warning in the example? It adds the complexity to the example due to warning filters and hides things from the user by creating an artificially smooth experience.

    If it was library or user code in production I agree that all warnings need to be addressed. For examples I'm less convinced.

    Another point to consider is that examples often serve as a starting point for user code. In which case, when an example is adapted to run on some other data, having any kind of warning filters is just harmful.

  22. rth commented on Jul 24, 2019

    @rth
    Member

    if the warning is caught and there's a comment in the code.

    Also one need to maintain comments in the code that get out of date. While that's not the case with runtime warnings.

  23. cmarmo commented on Jan 13, 2020

    @cmarmo
    Contributor

    @adrinjalali , we are planning to use this issue for the Paris sprint: I have reviewed all the examples and made a new checklist. Could you please update the description with it? I think that the issue will be more readable if the checklist is at the top of the page. Thanks a lot!

  24. adrinjalali commented on Jan 13, 2020

    @adrinjalali
    MemberAuthor

    Thanks @cmarmo, done.

  25. marimeireles commented on Jan 25, 2020

    @marimeireles
    Contributor

    Hello, I'm getting examples/neural_networks/plot_mnist_filters.py (ConvergenceWarning) for the WiMLDS Berlin Sprint =)

  26. malteserteresa commented on Jan 25, 2020

    @malteserteresa

    Myself and @andra-pumnea will change the cache location

  27. ksslng commented on Jan 28, 2020

    @ksslng
    Contributor

    I'm taking care of examples/plot_partial_dependence_visualization_api.py (FutureWarning).

  28. TiphaineV commented on Jan 28, 2020

    @TiphaineV
    Contributor

    I'll take care of examples/neural_networks/plot_mlp_alpha.py (ConvergenceWarning)

  29. hs-nazuna commented on Jan 31, 2020

    @hs-nazuna
    Contributor

    I tried to fix examples/neighbors/approximate_nearest_neighbors.py and submitted a PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions