{"action":"created","issue":{"url":"https://api.github.com/repos/mne-tools/mne-python/issues/4251","repository_url":"https://api.github.com/repos/mne-tools/mne-python","labels_url":"https://api.github.com/repos/mne-tools/mne-python/issues/4251/labels{/name}","comments_url":"https://api.github.com/repos/mne-tools/mne-python/issues/4251/comments","events_url":"https://api.github.com/repos/mne-tools/mne-python/issues/4251/events","html_url":"https://github.com/mne-tools/mne-python/issues/4251","id":227325978,"number":4251,"title":"Impossible to parallelize compute_covariance","user":{"login":"cmoutard","id":7878675,"avatar_url":"https://avatars1.githubusercontent.com/u/7878675?v=3","gravatar_id":"","url":"https://api.github.com/users/cmoutard","html_url":"https://github.com/cmoutard","followers_url":"https://api.github.com/users/cmoutard/followers","following_url":"https://api.github.com/users/cmoutard/following{/other_user}","gists_url":"https://api.github.com/users/cmoutard/gists{/gist_id}","starred_url":"https://api.github.com/users/cmoutard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cmoutard/subscriptions","organizations_url":"https://api.github.com/users/cmoutard/orgs","repos_url":"https://api.github.com/users/cmoutard/repos","events_url":"https://api.github.com/users/cmoutard/events{/privacy}","received_events_url":"https://api.github.com/users/cmoutard/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2017-05-09T10:52:02Z","updated_at":"2017-05-09T13:11:07Z","closed_at":null,"body":"While trying to parallelize mne.cov.compute_covariance (i.e. n_jobs>1), I get the following error in the frame of the function retrieve within sklearn's parallel.py file:\r\n\r\nPicklingError: Can't pickle <class 'mne.cov._ShrunkCovariance'>: it's not found as mne.cov._ShrunkCovariance\r\n\r\nIt looks like this is due to the fact that class _ShrunkCovariance is nested in a function.\r\nNested class/function is known to create issue with pickle.\r\nIf this is not my mistake as a user, I see two options:\r\n1) to unnest this class (and possibly _RegCovariance ?)\r\n2) to follow the suggestion of Pelson [here](http://stackoverflow.com/questions/1947904/how-can-i-pickle-a-nested-class-in-python)"},"comment":{"url":"https://api.github.com/repos/mne-tools/mne-python/issues/comments/300157810","html_url":"https://github.com/mne-tools/mne-python/issues/4251#issuecomment-300157810","issue_url":"https://api.github.com/repos/mne-tools/mne-python/issues/4251","id":300157810,"user":{"login":"Eric89GXL","id":2365790,"avatar_url":"https://avatars2.githubusercontent.com/u/2365790?v=3","gravatar_id":"","url":"https://api.github.com/users/Eric89GXL","html_url":"https://github.com/Eric89GXL","followers_url":"https://api.github.com/users/Eric89GXL/followers","following_url":"https://api.github.com/users/Eric89GXL/following{/other_user}","gists_url":"https://api.github.com/users/Eric89GXL/gists{/gist_id}","starred_url":"https://api.github.com/users/Eric89GXL/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Eric89GXL/subscriptions","organizations_url":"https://api.github.com/users/Eric89GXL/orgs","repos_url":"https://api.github.com/users/Eric89GXL/repos","events_url":"https://api.github.com/users/Eric89GXL/events{/privacy}","received_events_url":"https://api.github.com/users/Eric89GXL/received_events","type":"User","site_admin":false},"created_at":"2017-05-09T13:11:07Z","updated_at":"2017-05-09T13:11:07Z","body":"We can't do option 1 without importing `sklearn` on module import, which is something we've tried to avoid"}}
{"actor":{"display_login":"Eric89GXL"}}