hotfix(xgboost): cgroup limit for nthread
@@ -216,16 +216,12 @@ class _XgBoostRunner(Runner):
booster_params["nthread"] = 1
else:
booster_params["predictor"] = "cpu_predictor"
- booster_params["nthread"] = -1
+ booster_params["nthread"] = int(round(self.resource_quota.cpu))
return booster_params
# pylint: disable=arguments-differ,attribute-defined-outside-init
def _setup(self) -> None: # type: ignore[override]
- """_setup.
-
- :rtype: None
- """
self._model = xgb.core.Booster(
params=self._booster_params,
model_file=self._model_file,
