From 7664bb966e60cff82897eb16f2af3e9a49d5e664 Mon Sep 17 00:00:00 2001 From: Eric Larson Date: Thu, 6 Feb 2020 15:05:16 -0500 Subject: [PATCH 1/4] WIP: Try to fix crash --- environment.yml | 2 +- requirements.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/environment.yml b/environment.yml index 8b21de5b7ca..0e04692cde6 100644 --- a/environment.yml +++ b/environment.yml @@ -34,7 +34,7 @@ dependencies: - https://api.github.com/repos/numpy/numpydoc/zipball/master - vtk - https://api.github.com/repos/pyvista/pyvista/zipball/master - - mayavi + - https://api.github.com/repos/larsoner/mayavi/zipball/crash - PySurfer[save_movie] - dipy --only-binary dipy - nibabel diff --git a/requirements.txt b/requirements.txt index 28a0153ed29..83992308265 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,7 +1,7 @@ numpy scipy matplotlib -mayavi +https://api.github.com/repos/larsoner/mayavi/zipball/crash pyqt5!=5.14.1 pyqt5-sip sip From adb2e4eabc5fed10d3fe689401649dbfe5669659 Mon Sep 17 00:00:00 2001 From: Eric Larson Date: Fri, 7 Feb 2020 07:54:28 -0500 Subject: [PATCH 2/4] WIP: Second try --- environment.yml | 5 +++-- requirements.txt | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/environment.yml b/environment.yml index 0e04692cde6..f8eb5a6b049 100644 --- a/environment.yml +++ b/environment.yml @@ -34,8 +34,9 @@ dependencies: - https://api.github.com/repos/numpy/numpydoc/zipball/master - vtk - https://api.github.com/repos/pyvista/pyvista/zipball/master - - https://api.github.com/repos/larsoner/mayavi/zipball/crash - - PySurfer[save_movie] + - mayavi + - https://api.github.com/repos/larsoner/PySurfer/zipball/safer + - imageio - dipy --only-binary dipy - nibabel - nilearn diff --git a/requirements.txt b/requirements.txt index 83992308265..3c1e02a65be 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,7 +1,7 @@ numpy scipy matplotlib -https://api.github.com/repos/larsoner/mayavi/zipball/crash +mayavi pyqt5!=5.14.1 pyqt5-sip sip @@ -23,7 +23,8 @@ joblib psutil dipy https://api.github.com/repos/numpy/numpydoc/zipball/master -PySurfer[save_movie] +https://api.github.com/repos/larsoner/PySurfer/zipball/safer +imageio nilearn neo xlrd From 72a97393f0153dc46830fb314eb007170f2c2e91 Mon Sep 17 00:00:00 2001 From: Eric Larson Date: Fri, 7 Feb 2020 09:14:30 -0500 Subject: [PATCH 3/4] WIP: Remove PyVista --- azure-pipelines.yml | 2 ++ environment.yml | 3 +-- requirements.txt | 3 +-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index fbc0345f1b6..eb9cc2cf98d 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -120,6 +120,7 @@ jobs: set -e pip install --upgrade numpy scipy vtk pip install --upgrade -r requirements.txt + pip uninstall -yq pyvista pip install codecov condition: eq(variables['TEST_MODE'], 'pip') displayName: 'Install dependencies with pip' @@ -146,6 +147,7 @@ jobs: conda install numpy scipy matplotlib scikit-learn conda env update --file $env:CONDA_ENV pip uninstall -yq mne + pip uninstall -yq pyvista pip install codecov Write-Host ("##vso[task.setvariable variable=PATH]" + $env:PATH) condition: eq(variables['TEST_MODE'], 'conda') diff --git a/environment.yml b/environment.yml index f8eb5a6b049..8b21de5b7ca 100644 --- a/environment.yml +++ b/environment.yml @@ -35,8 +35,7 @@ dependencies: - vtk - https://api.github.com/repos/pyvista/pyvista/zipball/master - mayavi - - https://api.github.com/repos/larsoner/PySurfer/zipball/safer - - imageio + - PySurfer[save_movie] - dipy --only-binary dipy - nibabel - nilearn diff --git a/requirements.txt b/requirements.txt index 3c1e02a65be..28a0153ed29 100644 --- a/requirements.txt +++ b/requirements.txt @@ -23,8 +23,7 @@ joblib psutil dipy https://api.github.com/repos/numpy/numpydoc/zipball/master -https://api.github.com/repos/larsoner/PySurfer/zipball/safer -imageio +PySurfer[save_movie] nilearn neo xlrd From e81f0139b6c3f888497c46ea0213fbe929e29ce6 Mon Sep 17 00:00:00 2001 From: Eric Larson Date: Fri, 7 Feb 2020 12:18:37 -0500 Subject: [PATCH 4/4] FIX: Try another method --- azure-pipelines.yml | 2 -- mne/viz/tests/test_3d.py | 13 +++++++++++-- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index eb9cc2cf98d..fbc0345f1b6 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -120,7 +120,6 @@ jobs: set -e pip install --upgrade numpy scipy vtk pip install --upgrade -r requirements.txt - pip uninstall -yq pyvista pip install codecov condition: eq(variables['TEST_MODE'], 'pip') displayName: 'Install dependencies with pip' @@ -147,7 +146,6 @@ jobs: conda install numpy scipy matplotlib scikit-learn conda env update --file $env:CONDA_ENV pip uninstall -yq mne - pip uninstall -yq pyvista pip install codecov Write-Host ("##vso[task.setvariable variable=PATH]" + $env:PATH) condition: eq(variables['TEST_MODE'], 'conda') diff --git a/mne/viz/tests/test_3d.py b/mne/viz/tests/test_3d.py index dd50184c6fc..c1d57a36aa6 100644 --- a/mne/viz/tests/test_3d.py +++ b/mne/viz/tests/test_3d.py @@ -7,6 +7,7 @@ # # License: Simplified BSD +import gc import os.path as op from pathlib import Path @@ -646,12 +647,20 @@ def test_plot_vector_source_estimates(): data = np.random.RandomState(0).rand(n_verts, 3, n_time) stc = VectorSourceEstimate(data, vertices, 1, 1) - stc.plot('sample', subjects_dir=subjects_dir) + brain = stc.plot('sample', subjects_dir=subjects_dir) + brain.close() + del brain + gc.collect() with pytest.raises(ValueError, match='use "pos_lims"'): stc.plot('sample', subjects_dir=subjects_dir, clim=dict(pos_lims=[1, 2, 3])) - stc.plot('sample', subjects_dir=subjects_dir, hemi='both') + gc.collect() + + brain = stc.plot('sample', subjects_dir=subjects_dir, hemi='both') + brain.close() + del brain + gc.collect() @testing.requires_testing_data