mne-python icon indicating copy to clipboard operation
mne-python copied to clipboard

WIP: Add OpenMEEG to CIs

Open larsoner opened this issue 3 years ago • 1 comments

No real support here yet, just checking first to make sure that adding these to requirements.txt and environment.yml doesn't break CIs. Then eventually we can add proper support following https://github.com/mne-tools/mne-openmeeg or something similar

larsoner avatar Aug 06 '22 17:08 larsoner

Okay looks like the failures thus far are just due to an eeglabio update. I'll restart this once we figure out how to deal with that

larsoner avatar Aug 06 '22 18:08 larsoner

macOS failure is probably https://github.com/conda-forge/conda-forge-repodata-patches-feedstock/issues/310, a bug a caused by me messing up our recipe... hopefully I can fix it soon

larsoner avatar Aug 23 '22 14:08 larsoner

@agramfort I added your shims for OpenMEEG-based BEM, I/O, and forward computations, with some tests that you can use when you start trying to port over code. PyPi and conda-forge are updated:

https://pypi.org/project/openmeeg/2.5.1/ https://anaconda.org/conda-forge/openmeeg

Now you can just have fun :)

larsoner avatar Aug 23 '22 22:08 larsoner

@agramfort Windows is... having trouble with this. Can you write a little test over in the OpenMEEG repo using equivalent files? Or would it help for me to give it a shot? It'll be easier to debug over there.

larsoner avatar Aug 26 '22 23:08 larsoner

@agramfort for now I'm inclined to say it only works on windows, and raise an error there if you try to do it. That way we can continue to make progress on the sEEG generalization aspects in follow-up PRs. WDYT?

larsoner avatar Aug 27 '22 16:08 larsoner

... and this is painful:

56.70s call     mne/forward/tests/test_make_forward.py::test_make_forward_solution_openmeeg[3]

but I'm not sure there is much we can do about it :(

larsoner avatar Aug 27 '22 16:08 larsoner

... and we have a problem that comps is never used here

larsoner avatar Aug 27 '22 16:08 larsoner

Looking at the code, I think the best way to handle compensation is with a heavy refactoring of the forward computation code. I could do this at the same time as the MEG+EEG -> MEG+EEG+... dict-based approach that will facilitate iEEG channel forward computation (and maybe even fNIRS someday!).

My vote is to actually get that done and merged first, then rebase this PR and get it to fit within that framework.

larsoner avatar Aug 27 '22 16:08 larsoner

+1

Message ID: @.***>

agramfort avatar Aug 28 '22 08:08 agramfort

Got it to fail on Windows 3.10 pip pre. Let's try with 2.6.0.dev1 from TestPyPi which has OpenMP disabled...

larsoner avatar Aug 29 '22 20:08 larsoner

@agramfort do you want to attempt the rebase here or would you like me to do it?

larsoner avatar Aug 31 '22 13:08 larsoner

I won't have time in the coming days in the next days.

agramfort avatar Aug 31 '22 16:08 agramfort

Okay with file-based IO for _make_openmeeg_geometry we get on Windows:

E   PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\\Users\\VSSADM~1\\AppData\\Local\\Temp\\openmeeg-io-t2wktag7\\tmp.geom'

this suggests that OpenMEEG is not letting go of the file pointer. I added this to the OpenMEEG issue tracker

larsoner avatar Sep 01 '22 19:09 larsoner

@agramfort feel free to merge if you're happy

larsoner avatar Sep 01 '22 23:09 larsoner