Skip to content

Upgrade free-threading CI to run with pytest-freethreaded instead of pytest-xdist #30007

Open
@ogrisel

Description

@ogrisel

There is a new kid on the block that should help us find out whether scikit-learn and its dependencies can be reliably considered free-threading compatible:

https://pypi.org/project/pytest-freethreaded/

Let's try to adopt it in scikit-learn.

Here is a possible plan:

  • first run the tests locally a few times and see if they are tests (or a set of interacting tests) that cause a crash or a failure, open an issue for each of them, possibly upstream and then mark them as skipped under free-threading builds with a reference to the issue in the "reason" field;
  • then upgrade our nightly free-threading scheduled CI run to use pytest-freethreaded.

Any comments @lesteve @jeremiedbb @ngoldbaum?

EDIT: anyone interested in getting hands on the first item can find this resource useful:

https://py-free-threading.github.io/

EDIT 2: there is also the pytest-run-parallel plugin that can serve a similar purpose.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Build / CINeeds DecisionRequires decisionfree-threadingPRs and issues related to support for free-threaded CPython (a.k.a. nogil or no-GIL, PEP 703)module:test-suiteeverything related to our tests

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions