Repository navigation
Open
Labels
BugNeeds InvestigationIssue requires investigationOS:WindowsProblem specific to Windowsfree-threadingPRs and issues related to support for free-threaded CPython (a.k.a. nogil or no-GIL, PEP 703)
Description
Noticed in build log. An automated issue was opened in #30801 and closed the next day.
This needs some investigation to figure out whether this can be reproduced locally and whether this is actually Windows-specific.
This may be a joblib issue as well.
================================== FAILURES ===================================
_____________________________ test_absolute_error _____________________________
def test_absolute_error():
# For coverage only.
X, y = make_regression(n_samples=500, random_state=0)
gbdt = HistGradientBoostingRegressor(loss="absolute_error", random_state=0)
> gbdt.fit(X, y)
..\venv-test\Lib\site-packages\sklearn\ensemble\_hist_gradient_boosting\tests\test_gradient_boosting.py:225:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
..\venv-test\Lib\site-packages\sklearn\base.py:1389: in wrapper
return fit_method(estimator, *args, **kwargs)
..\venv-test\Lib\site-packages\sklearn\ensemble\_hist_gradient_boosting\gradient_boosting.py:663: in fit
X_binned_train = self._bin_data(X_train, is_training_data=True)
..\venv-test\Lib\site-packages\sklearn\ensemble\_hist_gradient_boosting\gradient_boosting.py:1178: in _bin_data
X_binned = self._bin_mapper.fit_transform(X) # F-aligned array
..\venv-test\Lib\site-packages\sklearn\utils\_set_output.py:319: in wrapped
data_to_wrap = f(self, X, *args, **kwargs)
..\venv-test\Lib\site-packages\sklearn\base.py:918: in fit_transform
return self.fit(X, **fit_params).transform(X)
..\venv-test\Lib\site-packages\sklearn\ensemble\_hist_gradient_boosting\binning.py:234: in fit
non_cat_thresholds = Parallel(n_jobs=self.n_threads, backend="threading")(
..\venv-test\Lib\site-packages\sklearn\utils\parallel.py:82: in __call__
return super().__call__(iterable_with_config_and_warning_filters)
..\venv-test\Lib\site-packages\joblib\parallel.py:2007: in __call__
return output if self.return_generator else list(output)
..\venv-test\Lib\site-packages\joblib\parallel.py:1711: in _get_outputs
self._terminate_and_reset()
..\venv-test\Lib\site-packages\joblib\parallel.py:1386: in _terminate_and_reset
self._backend.terminate()
..\venv-test\Lib\site-packages\joblib\_parallel_backends.py:262: in terminate
self._pool.close()
..\..\..\..\pypa\cibuildwheel\Cache\nuget-cpython\python-freethreaded.3.13.0\tools\Lib\multiprocessing\pool.py:652: in close
self._change_notifier.put(None)
..\..\..\..\pypa\cibuildwheel\Cache\nuget-cpython\python-freethreaded.3.13.0\tools\Lib\multiprocessing\queues.py:394: in put
self._writer.send_bytes(obj)
..\..\..\..\pypa\cibuildwheel\Cache\nuget-cpython\python-freethreaded.3.13.0\tools\Lib\multiprocessing\connection.py:200: in send_bytes
self._send_bytes(m[offset:offset + size])
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <multiprocessing.connection.PipeConnection object at 0x00000243F43267C0>
buf = <memory at 0x00000243F4C65AC0>
def _send_bytes(self, buf):
if self._send_ov is not None:
# A connection should only be used by a single thread
> raise ValueError("concurrent send_bytes() calls "
"are not supported")
E ValueError: concurrent send_bytes() calls are not supported
..\..\..\..\pypa\cibuildwheel\Cache\nuget-cpython\python-freethreaded.3.13.0\tools\Lib\multiprocessing\connection.py:287: ValueError
Reacted by प्रभात कुमार सिंह
Metadata
Metadata
Assignees
Labels
BugNeeds InvestigationIssue requires investigationOS:WindowsProblem specific to Windowsfree-threadingPRs and issues related to support for free-threaded CPython (a.k.a. nogil or no-GIL, PEP 703)
Activity
lesteve commentedon May 9, 2025
Seems similar to python/cpython#130733. Closing for now since this seems an issue in CPython rather than in scikit-learn.
ogrisel commentedon Oct 22, 2025
I think we should keep this issue open as long as there is no proper fix released either at the joblib or cpython level or a workaround in scikit-learn.
[-]Windows free-threaded CPython 3.13 ValueError: concurrent send_bytes() calls are not supported[/-][+]Windows free-threaded ValueError: concurrent send_bytes() calls are not supported[/+][-]Windows free-threaded ValueError: concurrent send_bytes() calls are not supported[/-][+]Windows free-threaded Python ValueError: concurrent send_bytes() calls are not supported[/+]lesteve commentedon Oct 22, 2025
For cross-linking purposes, this issue was noticed in Windows arm
cp314ttwo days in a row in the wheels CI: #32393 (comment)More info was actually put there as well: #32491 (comment)
ogrisel commentedon Oct 23, 2025
We probably need to debug this at the joblib level. To do so, a working cp314 free-threading CI would help: joblib/joblib#1747
lesteve commentedon Oct 23, 2025
I am 95% sure this is the CPython issue python/cpython#130733, the stack-traces look extremely similar.
lesteve commentedon Nov 23, 2025
Trying to summarize a bit the issues we have seen in the wheels CI so far #32393.
virchan commentedon Sep 18, 2026
This happened again in #34977. I re-ran the failed job, and everything is green.