---------------------------------------------------------------------------
KeyboardInterrupt Traceback (most recent call last)
<ipython-input-8-0f1430fa2555> in <module>()
7 return word2vec_model.wmdistance(eos_corpus[int(x)], eos_corpus[int(y)])
8
----> 9 X_wmd_distance = pairwise_distances(A, metric=f, n_jobs=-1)
/usr/local/lib/python3.5/dist-packages/sklearn/metrics/pairwise.py in pairwise_distances(X, Y, metric, n_jobs, **kwds)
1238 func = partial(distance.cdist, metric=metric, **kwds)
1239
-> 1240 return _parallel_pairwise(X, Y, func, n_jobs, **kwds)
1241
1242
/usr/local/lib/python3.5/dist-packages/sklearn/metrics/pairwise.py in _parallel_pairwise(X, Y, func, n_jobs, **kwds)
1087 ret = Parallel(n_jobs=n_jobs, verbose=0)(
1088 fd(X, Y[s], **kwds)
-> 1089 for s in gen_even_slices(Y.shape[0], n_jobs))
1090
1091 return np.hstack(ret)
/usr/local/lib/python3.5/dist-packages/sklearn/externals/joblib/parallel.py in __call__(self, iterable)
766 # consumption.
767 self._iterating = False
--> 768 self.retrieve()
769 # Make sure that we get a last message telling us we are done
770 elapsed_time = time.time() - self._start_time
/usr/local/lib/python3.5/dist-packages/sklearn/externals/joblib/parallel.py in retrieve(self)
717 ensure_ready = self._managed_backend
718 backend.abort_everything(ensure_ready=ensure_ready)
--> 719 raise exception
720
721 def __call__(self, iterable):
/usr/local/lib/python3.5/dist-packages/sklearn/externals/joblib/parallel.py in retrieve(self)
680 # check if timeout supported in backend future implementation
681 if 'timeout' in getfullargspec(job.get).args:
--> 682 self._output.extend(job.get(timeout=self.timeout))
683 else:
684 self._output.extend(job.get())
/usr/lib/python3.5/multiprocessing/pool.py in get(self, timeout)
600
601 def get(self, timeout=None):
--> 602 self.wait(timeout)
603 if not self.ready():
604 raise TimeoutError
/usr/lib/python3.5/multiprocessing/pool.py in wait(self, timeout)
597
598 def wait(self, timeout=None):
--> 599 self._event.wait(timeout)
600
601 def get(self, timeout=None):
/usr/lib/python3.5/threading.py in wait(self, timeout)
547 signaled = self._flag
548 if not signaled:
--> 549 signaled = self._cond.wait(timeout)
550 return signaled
551
/usr/lib/python3.5/threading.py in wait(self, timeout)
291 try: # restore state no matter what (e.g., KeyboardInterrupt)
292 if timeout is None:
--> 293 waiter.acquire()
294 gotit = True
295 else:
KeyboardInterrupt: