kats/models/ensemble/kats_ensemble.py [305:325]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        num_process = min(len(MODELS), (cpu_count() - 1) // 2)
        if num_process < 1:
            num_process = 1
        # pyre-fixme[16]: `SyncManager` has no attribute `Pool`.
        pool = multiprocessing.Manager().Pool(
            processes=(num_process), maxtasksperchild=1000
        )

        fitted_models = {}
        for model in models.models:
            fitted_models[model.model_name] = pool.apply_async(
                self._fit_single,
                args=(
                    data,
                    MODELS[model.model_name.split("_")[0].lower()],
                    model.model_params,
                ),
            )
        pool.close()
        pool.join()
        fitted = {model: res.get() for model, res in fitted_models.items()}
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



kats/models/ensemble/kats_ensemble.py [598:618]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        num_process = min(len(MODELS), (cpu_count() - 1) // 2)
        if num_process < 1:
            num_process = 1
        # pyre-fixme[16]: `SyncManager` has no attribute `Pool`.
        pool = multiprocessing.Manager().Pool(
            processes=(num_process), maxtasksperchild=1000
        )

        fitted_models = {}
        for model in models.models:
            fitted_models[model.model_name] = pool.apply_async(
                self._fit_single,
                args=(
                    data,
                    MODELS[model.model_name.split("_")[0].lower()],
                    model.model_params,
                ),
            )
        pool.close()
        pool.join()
        fitted = {model: res.get() for model, res in fitted_models.items()}
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



