def _fit_slave(self, X, y):
"""Pipeline evaluation.
Parameters
----------
X : array of float, shape : n_samples x n_features, default : ()
The input data matrix.
"""
try:
while True:
status_ = MPI.Status()
received = COMM.recv(source=0, tag=MPI.ANY_TAG, status=status_)
# check the tag of the received message
if status_.tag == EXIT:
return
# do the work
i, (train_index, test_index) = received
# if self.verbose:
# print("[{} {}]: Performing experiment {}".format(
# NAME, RANK, i))
cv_results_ = _worker(self, i, X, y, train_index, test_index)
# if self.verbose:
# print("[{} {}]: Experiment {} completed".format(
# NAME, RANK, i))
COMM.send(cv_results_, dest=0, tag=0)
except StandardError as exc:
warnings.warn("Quitting ... TB:", str(exc))
评论列表
文章目录