{"action":"created","issue":{"url":"https://api.github.com/repos/automl/auto-sklearn/issues/239","repository_url":"https://api.github.com/repos/automl/auto-sklearn","labels_url":"https://api.github.com/repos/automl/auto-sklearn/issues/239/labels{/name}","comments_url":"https://api.github.com/repos/automl/auto-sklearn/issues/239/comments","events_url":"https://api.github.com/repos/automl/auto-sklearn/issues/239/events","html_url":"https://github.com/automl/auto-sklearn/issues/239","id":209981977,"number":239,"title":"Improvement: parallelize `AutoML.predict`","user":{"login":"lsorber","id":4543654,"avatar_url":"https://avatars.githubusercontent.com/u/4543654?v=3","gravatar_id":"","url":"https://api.github.com/users/lsorber","html_url":"https://github.com/lsorber","followers_url":"https://api.github.com/users/lsorber/followers","following_url":"https://api.github.com/users/lsorber/following{/other_user}","gists_url":"https://api.github.com/users/lsorber/gists{/gist_id}","starred_url":"https://api.github.com/users/lsorber/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lsorber/subscriptions","organizations_url":"https://api.github.com/users/lsorber/orgs","repos_url":"https://api.github.com/users/lsorber/repos","events_url":"https://api.github.com/users/lsorber/events{/privacy}","received_events_url":"https://api.github.com/users/lsorber/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2017-02-24T07:54:41Z","updated_at":"2017-02-24T08:48:23Z","closed_at":null,"body":"Prediction with an ensemble can take a long time depending on the number of models. A quick win would be to use a `multiprocessing.Pool.map` to replace this for loop in `AutoML.predict` (line 455-470):\r\n\r\n```\r\nall_predictions = []\r\nfor identifier in self.ensemble_.get_model_identifiers():\r\n    model = self.models_[identifier]\r\n\r\n    X_ = X.copy()\r\n    if self._task in REGRESSION_TASKS:\r\n        prediction = model.predict(X_)\r\n    else:\r\n        prediction = model.predict_proba(X_)\r\n\r\n    if len(prediction.shape) < 1 or len(X_.shape) < 1 or \\\r\n            X_.shape[0] < 1 or prediction.shape[0] != X_.shape[0]:\r\n        self._logger.warning(\"Prediction shape for model %s is %s \"\r\n                             \"while X_.shape is %s\" %\r\n                             (model, str(prediction.shape),\r\n                              str(X_.shape)))\r\n    all_predictions.append(prediction)\r\n```"},"comment":{"url":"https://api.github.com/repos/automl/auto-sklearn/issues/comments/282237473","html_url":"https://github.com/automl/auto-sklearn/issues/239#issuecomment-282237473","issue_url":"https://api.github.com/repos/automl/auto-sklearn/issues/239","id":282237473,"user":{"login":"mfeurer","id":5320498,"avatar_url":"https://avatars.githubusercontent.com/u/5320498?v=3","gravatar_id":"","url":"https://api.github.com/users/mfeurer","html_url":"https://github.com/mfeurer","followers_url":"https://api.github.com/users/mfeurer/followers","following_url":"https://api.github.com/users/mfeurer/following{/other_user}","gists_url":"https://api.github.com/users/mfeurer/gists{/gist_id}","starred_url":"https://api.github.com/users/mfeurer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mfeurer/subscriptions","organizations_url":"https://api.github.com/users/mfeurer/orgs","repos_url":"https://api.github.com/users/mfeurer/repos","events_url":"https://api.github.com/users/mfeurer/events{/privacy}","received_events_url":"https://api.github.com/users/mfeurer/received_events","type":"User","site_admin":false},"created_at":"2017-02-24T08:48:23Z","updated_at":"2017-02-24T08:48:23Z","body":"That'd be great. I'll be on holiday from next week, so I won't be able to respond and merge this for a bit."}}
{"actor":{"display_login":"mfeurer"}}