Mne python compute covariance

Hi,

I'm getting the following error
(PicklingError: Can't pickle <class 'mne.cov._ShrunkCovariance'>: it's not found as mne.cov._ShrunkCovariance)
when running computing covariance. It happens at the cross validation stage.

Any help would be appreciated.

Thanks,

Peter

hi Peter,

can you share a gist to replicate the problem?

I think I know what's going on but with a gist I am sure it fixes your pb.

thx
Alex

Hi Alex,

I'm using the standard mne.compute_covariance call

cov = mne.compute_covariance(epochs['condition'], method = 'shrunk', n_jobs = 3).

I've attached a link to the error below. Also, I've tried using the PCA method and get another error message (with the helpful suggestion to contact you guys at the end!). Please find the link below too.

Peter.

shrunk estimate: https://gist.github.com/orcasha/c990decc15f38a3300ffa6e2f976eb25

PCA estimate: https://gist.github.com/orcasha/443bc7e74fd3e7e50a7ce1371b4bef31

hi,

I could reproduce the problem. I opened I issue:

https://github.com/mne-tools/mne-python/issues/4140

We'll fix ASAP. For now use n_jobs=1.

Thanks for taking the time to report the bug.

Best,
Alex

Thank you Peter for reporting,
I will look into it today.

Denis