Skip to content

CI: reduce the runtime of the test suite #2351

@GaetandeCast

Description

@GaetandeCast

What would you like to say?

The run time of the test suite has multiplied by 2 to 3 times in the past few months, see: tests with coverage taking 5 minutes in november when they now take over 10 minutes. That forced us increase the timeout of the pytest workflow in #2344.

Since November, the bulk of the changes in the tests is linked to changes in the displays of skore: extension of ConfusionMatrixDisplay, addition of PermutationImportanceDisplay, refactor of other misc. display to use seaborn, addition of new features (subplot_by, data_source="both", sorting_order & select_k ) etc.

This made the test suite grow in a disorganized way and potentially leading to the observed slowdown of the testing jobs.

Here are the some leads to investigate:

  • I noticed that the tests for the CoefficientsDisplay take a significant amount of time to run compared to other displays.
    Ex on my machine: pytest skore/tests/unit/displays/coefficients takes 62 seconds vs 9.3 seconds for skore/tests/unit/displays/roc_curve
  • Using parametrized tests and optimized fixtures when possible should optimize the runtime of many tests and make them easier to maintain in the future.
  • It is possible that part of the slowdown is due to seaborn being slower than pure matplotlib. This is just an intuition.

If anyone has any suggestions, remarks or insights on this matter, feel free to post them here.

Metadata

Metadata

Assignees

Labels

chore 🚧Maintenance and internal enhancement work to be doneneeds Investigation 🔎Requires investigating the issue to know if we should go further with the idea

Type

Projects

Status

In progress - High Priority

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions