pdb.set_trace()
pdps = []
import functools
number_of_process = Pool(n_jobs)
for pd_row in number_of_process.map(functools.partial(compute_pd, model_fn=predict_fn,
grid_expanded=grid_expanded, number_of_classes=n_classes, feature_ids=feature_ids,
input_data=data_sample), [i for i in range(grid_expanded.shape[0])]):
pdps.append(pd_row)
After Change
n_classes = self._predict_fn.n_classes
pd_list = []
import functools
executor_instance = Pool(n_jobs) if n_jobs > 0 else Pool()
for pd_row in executor_instance.map(functools.partial(compute_pd, model_fn=predict_fn,
grid_expanded=grid_expanded, number_of_classes=n_classes, feature_ids=feature_ids,
input_data=data_sample), [i for i in range(grid_expanded.shape[0])]):