SPB Git forge

spb/wp12_uqo

Public
5commits 1branches 0releases
1.2 MBsize
maindefault branch
1 mo agolast push
Python 75.9% TeX 24%

Fix thread oversubscription: single-threaded estimators in per-ticker workers

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Simon-Pierre Boucher committed 1 mo ago (Aug 11, 2026) parent af641d2

1 changed file +3 −3

modified src/wp12/models_ml.py +3 −3
@@ -130,19 +130,19 @@ def _make_estimator(name: str, params: dict[str, Any], seed: int):
130 130 if name == "RF":
131 131 return RandomForestRegressor(
132 132 n_estimators=300, min_samples_leaf=params["min_samples_leaf"],
133 − max_features=params["max_features"], random_state=seed, n_jobs=-1,
133 + max_features=params["max_features"], random_state=seed, n_jobs=1,
134 134 )
135 135 if name == "XGBoost":
136 136 return XGBRegressor(
137 137 n_estimators=400, learning_rate=0.05, max_depth=params["max_depth"],
138 138 subsample=0.8, colsample_bytree=0.8, random_state=seed,
139 − n_jobs=-1, verbosity=0,
139 + n_jobs=1, verbosity=0,
140 140 )
141 141 if name == "LightGBM":
142 142 return LGBMRegressor(
143 143 n_estimators=400, learning_rate=0.05, num_leaves=params["num_leaves"],
144 144 min_child_samples=20, subsample=0.8, colsample_bytree=0.8,
145 − random_state=seed, n_jobs=-1, verbose=-1,
145 + random_state=seed, n_jobs=1, verbose=-1,
146 146 )
147 147 raise ValueError(f"unknown estimator {name}")
148 148
149 149