Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Support free-threaded CPython #9707

@kumaraditya303

Description

@kumaraditya303

This is a tracker issue for adding free-threading support to statsmodels. See https://py-free-threading.github.io/ for a overview of how free-threading can be supported by extension modules.

This can done in three steps incrementally:

  • First step is to add 3.14t CI to statsmodels without making any changes to ensure that statsmodels can be compiled under free-threading. This would re-enable the GIL at runtime.
  • Next step is to fix thread safety issues of statsmodels and decide on the thread safety guarantees of statsmodels. After that statsmodels can disable the GIL being re-enabled again. The thread safety can be verified by running tests using pytest-run-parallel under TSAN.
  • Last step would be to add CI with pytest-run-parallel after all the thread safety work is complete to ensure that the implementation remains thread safe.

For the thread safety work, statsmodels depends on numpy, pandas and a few other libraries which have thread safety issues that are currently under work like numpy/numpy#30426. I'll update this issue as these blockers are fixed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions