Skip to content

Test really slow only for 1 travis job #13208

Closed

Description

@jeremiedbb

The test test_pairwise_distances_data_derived_params from metrics.pairwise is really really slow (25s instead of a few 100ms).

========================== slowest 20 test durations ===========================
25.10s call     metrics/tests/test_pairwise.py::test_pairwise_distances_data_derived_params[Y is not X-pairwise_distances_chunked-seuclidean-2]
25.00s call     metrics/tests/test_pairwise.py::test_pairwise_distances_data_derived_params[Y is not X-pairwise_distances_chunked-mahalanobis-2]
24.57s call     metrics/tests/test_pairwise.py::test_pairwise_distances_data_derived_params[Y is X-pairwise_distances_chunked-mahalanobis-2]
24.41s call     metrics/tests/test_pairwise.py::test_pairwise_distances_data_derived_params[Y is X-pairwise_distances_chunked-seuclidean-2]

The tricky thing is that:

  • it's only on the distrib=ubuntu job.
  • it affects pairwise_distances_chunked but not pairwise_distances
  • it's slow only for n_jobs > 1

Activity

  1. btel commented on Feb 26, 2019

    @btel
    Contributor

    I tested it locally with ubuntu:16.04 docker image (apparently the same one as used by travisCI), python, scipy and atlas from public ubuntu apt repository. The test run times are looking ok:

    0.39s call     sklearn/metrics/tests/test_pairwise.py::test_pairwise_distances_data_derived_params[Y is not X-pairwise_distances_chunked-mahalanobis-2]
    0.37s call     sklearn/metrics/tests/test_pairwise.py::test_pairwise_distances_data_derived_params[Y is X-pairwise_distances_chunked-mahalanobis-2]
    0.33s call     sklearn/metrics/tests/test_pairwise.py::test_pairwise_distances_data_derived_params[Y is X-pairwise_distances-seuclidean-2]
    0.29s call     sklearn/metrics/tests/test_pairwise.py::test_pairwise_distances_data_derived_params[Y is not X-pairwise_distances_chunked-seuclidean-2]
    0.28s call     sklearn/metrics/tests/test_pairwise.py::test_pairwise_distances_data_derived_params[Y is X-pairwise_distances_chunked-seuclidean-2]
    

    The docker's lib versions:

    >>> import sklearn; sklearn.show_versions()
    
    System:
    executable: /usr/bin/python3
       machine: Linux-4.20.8-arch1-1-ARCH-x86_64-with-Ubuntu-16.04-xenial
        python: 3.5.2 (default, Nov 12 2018, 13:43:14)  [GCC 5.4.0 20160609]
    
    BLAS:
      lib_dirs: /usr/lib/atlas-base
    cblas_libs: cblas
        macros: HAVE_CBLAS=None, NO_ATLAS_INFO=-1
    
    Python deps:
        pandas: None
         scipy: 0.17.0
           pip: 8.1.1
         numpy: 1.11.0
        Cython: 0.29.5
       sklearn: 0.21.dev0
    setuptools: 40.8.0
    
  2. btel commented on Mar 1, 2019

    @btel
    Contributor

    Since travisCI was removed from the github checks by PR #13341, should we close this issue?

  3. jeremiedbb commented on Mar 1, 2019

    @jeremiedbb
    MemberAuthor

    Can you look at the tests on azure jobs to check if it's not reproduced there ?

    But anyway, even if we dropped travis, the issue still exists, so I don't think we should close it for now.

  4. adrinjalali commented on Mar 1, 2019

    @adrinjalali
    Member

    @thomasjpfan do we have the statistics about test times on Azure?

  5. btel commented on Mar 1, 2019

    @btel
    Contributor

    here is what azure says:

    ========================== slowest 20 test durations ===========================
    8.58s call     utils/tests/test_estimator_checks.py::test_check_estimator
    8.01s call     metrics/tests/test_pairwise.py::test_pairwise_distances_data_derived_params[Y is not X-pairwise_distances_chunked-mahalanobis-2]
    7.97s call     metrics/tests/test_pairwise.py::test_pairwise_distances_data_derived_params[Y is X-pairwise_distances_chunked-mahalanobis-2]
    7.90s call     metrics/tests/test_pairwise.py::test_pairwise_distances_data_derived_params[Y is not X-pairwise_distances_chunked-seuclidean-2]
    7.90s call     metrics/tests/test_pairwise.py::test_pairwise_distances_data_derived_params[Y is X-pairwise_distances_chunked-seuclidean-2]
    7.61s call     metrics/tests/test_classification.py::test_matthews_corrcoef_overflow[1000000]
    4.48s call     utils/tests/test_estimator_checks.py::test_check_estimator_clones
    4.29s call     tree/tests/test_tree.py::test_min_impurity_decrease
    

    https://dev.azure.com/scikit-learn/scikit-learn/_build/results?buildId=656&view=logs&jobId=525627ef-fb84-5ca5-3e29-d0f0cecb144c

    The tests are also slow on azure. What platform is used to test on Azure?

  6. jeremiedbb commented on Mar 1, 2019

    @jeremiedbb
    MemberAuthor

    @adrinjalali Apparently we do :)
    So the issue is still here and happens on the same distrib

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