Description of the problem
I'm busy upgrading MNE in Fedora to version 1.4.2. The package builds fine, but there are issues with some tests. In Fedora Rawhide Python 3.12 and Cython 3.0.0 have recently landed.
Tests just hung forever in our build environment. I'm currently running tests verbosely to see if it issues any warnings / errors. I also added --timeout=180 to pytest in order to let the tests complete.
It was mne/stats/tests/test_cluster_level.py::test_thresholds[NumPy] test that just hung and needed the timeout for tests to proceed.
Here is the summary of test failures:
XFAIL mne/viz/backends/tests/test_renderer.py::test_backend_environment_setup[foo]
ERROR mne/time_frequency/tests/test_spectrum.py::test_spectrum_errors - pytest.PytestUnraisableExceptionWarning: Exception ignored in: <function tq...
FAILED mne/decoding/tests/test_base.py::test_get_coef_inverse_transform[Scaler-kwargs0-True] - DeprecationWarning: datetime.utcfromtimestamp() is deprecated and scheduled...
FAILED mne/decoding/tests/test_base.py::test_get_coef_inverse_transform[Scaler-kwargs0-False] - DeprecationWarning: datetime.utcfromtimestamp() is deprecated and scheduled...
FAILED mne/decoding/tests/test_base.py::test_get_coef_inverse_transform[_Noop-kwargs1-True] - DeprecationWarning: datetime.utcfromtimestamp() is deprecated and scheduled...
FAILED mne/decoding/tests/test_base.py::test_get_coef_inverse_transform[_Noop-kwargs1-False] - DeprecationWarning: datetime.utcfromtimestamp() is deprecated and scheduled...
FAILED mne/decoding/tests/test_base.py::test_get_coef_multiclass_full[4-10-2] - DeprecationWarning: datetime.utcfromtimestamp() is deprecated and scheduled...
FAILED mne/decoding/tests/test_base.py::test_get_coef_multiclass_full[4-3-2] - DeprecationWarning: datetime.utcfromtimestamp() is deprecated and scheduled...
FAILED mne/decoding/tests/test_base.py::test_get_coef_multiclass_full[3-2-1] - DeprecationWarning: datetime.utcfromtimestamp() is deprecated and scheduled...
FAILED mne/decoding/tests/test_base.py::test_get_coef_multiclass_full[3-1-2] - DeprecationWarning: datetime.utcfromtimestamp() is deprecated and scheduled...
FAILED mne/decoding/tests/test_base.py::test_cross_val_multiscore - DeprecationWarning: datetime.utcfromtimestamp() is deprecated and scheduled...
FAILED mne/decoding/tests/test_receptive_field.py::test_rank_deficiency - DeprecationWarning: datetime.utcfromtimestamp() is deprecated and scheduled...
FAILED mne/decoding/tests/test_receptive_field.py::test_time_delaying_fast_calc[1] - DeprecationWarning: datetime.utcfromtimestamp() is deprecated and scheduled...
FAILED mne/decoding/tests/test_receptive_field.py::test_time_delaying_fast_calc[cuda] - DeprecationWarning: datetime.utcfromtimestamp() is deprecated and scheduled...
FAILED mne/decoding/tests/test_receptive_field.py::test_receptive_field_1d[1] - DeprecationWarning: datetime.utcfromtimestamp() is deprecated and scheduled...
FAILED mne/decoding/tests/test_receptive_field.py::test_receptive_field_1d[cuda] - DeprecationWarning: datetime.utcfromtimestamp() is deprecated and scheduled...
FAILED mne/decoding/tests/test_receptive_field.py::test_receptive_field_nd[1] - DeprecationWarning: datetime.utcfromtimestamp() is deprecated and scheduled...
FAILED mne/decoding/tests/test_receptive_field.py::test_receptive_field_nd[cuda] - DeprecationWarning: datetime.utcfromtimestamp() is deprecated and scheduled...
FAILED mne/decoding/tests/test_receptive_field.py::test_inverse_coef - DeprecationWarning: datetime.utcfromtimestamp() is deprecated and scheduled...
FAILED mne/decoding/tests/test_search_light.py::test_search_light - pytest.PytestUnraisableExceptionWarning: Exception ignored in: <function tq...
FAILED mne/decoding/tests/test_search_light.py::test_generalization_light - DeprecationWarning: datetime.utcfromtimestamp() is deprecated and scheduled...
FAILED mne/decoding/tests/test_search_light.py::test_verbose_arg[1-True] - DeprecationWarning: datetime.utcfromtimestamp() is deprecated and scheduled...
FAILED mne/decoding/tests/test_search_light.py::test_verbose_arg[2-info] - DeprecationWarning: datetime.utcfromtimestamp() is deprecated and scheduled...
FAILED mne/decoding/tests/test_search_light.py::test_cross_val_predict - DeprecationWarning: datetime.utcfromtimestamp() is deprecated and scheduled...
FAILED mne/io/bti/tests/test_bti.py::test_crop_append - pytest.PytestUnraisableExceptionWarning: Exception ignored in: <function tq...
FAILED mne/stats/tests/test_cluster_level.py::test_thresholds[NumPy] - Failed: Timeout >180.0s
FAILED mne/stats/tests/test_cluster_level.py::test_permutation_large_n_samples[NumPy] - DeprecationWarning: datetime.utcfromtimestamp() is deprecated and scheduled...
FAILED mne/stats/tests/test_cluster_level.py::test_permutation_step_down_p[NumPy] - DeprecationWarning: datetime.utcfromtimestamp() is deprecated and scheduled...
FAILED mne/stats/tests/test_cluster_level.py::test_cluster_permutation_test[NumPy] - DeprecationWarning: datetime.utcfromtimestamp() is deprecated and scheduled...
FAILED mne/stats/tests/test_cluster_level.py::test_cluster_permutation_t_test[NumPy-ttest_1samp_no_p] - DeprecationWarning: datetime.utcfromtimestamp() is deprecated and scheduled...
FAILED mne/stats/tests/test_cluster_level.py::test_cluster_permutation_t_test[NumPy-stat_fun1] - DeprecationWarning: datetime.utcfromtimestamp() is deprecated and scheduled...
FAILED mne/stats/tests/test_cluster_level.py::test_cluster_permutation_with_adjacency[NumPy] - DeprecationWarning: datetime.utcfromtimestamp() is deprecated and scheduled...
FAILED mne/stats/tests/test_cluster_level.py::test_permutation_cluster_signs[1samp-0.1] - DeprecationWarning: datetime.utcfromtimestamp() is deprecated and scheduled...
FAILED mne/stats/tests/test_cluster_level.py::test_permutation_cluster_signs[1samp-TFCE] - DeprecationWarning: datetime.utcfromtimestamp() is deprecated and scheduled...
FAILED mne/stats/tests/test_cluster_level.py::test_permutation_cluster_signs[ind-0.1] - DeprecationWarning: datetime.utcfromtimestamp() is deprecated and scheduled...
FAILED mne/stats/tests/test_cluster_level.py::test_permutation_cluster_signs[ind-TFCE] - DeprecationWarning: datetime.utcfromtimestamp() is deprecated and scheduled...
FAILED mne/stats/tests/test_cluster_level.py::test_permutation_adjacency_equiv[NumPy] - DeprecationWarning: datetime.utcfromtimestamp() is deprecated and scheduled...
FAILED mne/stats/tests/test_cluster_level.py::test_spatio_temporal_cluster_adjacency[NumPy] - DeprecationWarning: datetime.utcfromtimestamp() is deprecated and scheduled...
FAILED mne/stats/tests/test_cluster_level.py::test_permutation_test_H0[NumPy] - DeprecationWarning: datetime.utcfromtimestamp() is deprecated and scheduled...
FAILED mne/stats/tests/test_cluster_level.py::test_tfce_thresholds[NumPy] - DeprecationWarning: datetime.utcfromtimestamp() is deprecated and scheduled...
FAILED mne/stats/tests/test_cluster_level.py::test_output_equiv[None-mask-shape0] - DeprecationWarning: datetime.utcfromtimestamp() is deprecated and scheduled...
FAILED mne/stats/tests/test_cluster_level.py::test_output_equiv[None-mask-shape1] - DeprecationWarning: datetime.utcfromtimestamp() is deprecated and scheduled...
FAILED mne/stats/tests/test_cluster_level.py::test_output_equiv[None-mask-shape2] - DeprecationWarning: datetime.utcfromtimestamp() is deprecated and scheduled...
FAILED mne/stats/tests/test_cluster_level.py::test_output_equiv[None-indices-shape0] - DeprecationWarning: datetime.utcfromtimestamp() is deprecated and scheduled...
FAILED mne/stats/tests/test_cluster_level.py::test_output_equiv[None-indices-shape1] - DeprecationWarning: datetime.utcfromtimestamp() is deprecated and scheduled...
FAILED mne/stats/tests/test_cluster_level.py::test_output_equiv[None-indices-shape2] - DeprecationWarning: datetime.utcfromtimestamp() is deprecated and scheduled...
FAILED mne/stats/tests/test_cluster_level.py::test_output_equiv[sparse-mask-shape0] - DeprecationWarning: datetime.utcfromtimestamp() is deprecated and scheduled...
FAILED mne/stats/tests/test_cluster_level.py::test_output_equiv[sparse-mask-shape1] - DeprecationWarning: datetime.utcfromtimestamp() is deprecated and scheduled...
FAILED mne/stats/tests/test_cluster_level.py::test_output_equiv[sparse-mask-shape2] - DeprecationWarning: datetime.utcfromtimestamp() is deprecated and scheduled...
FAILED mne/stats/tests/test_cluster_level.py::test_output_equiv[sparse-indices-shape0] - DeprecationWarning: datetime.utcfromtimestamp() is deprecated and scheduled...
FAILED mne/stats/tests/test_cluster_level.py::test_output_equiv[sparse-indices-shape1] - DeprecationWarning: datetime.utcfromtimestamp() is deprecated and scheduled...
FAILED mne/stats/tests/test_cluster_level.py::test_output_equiv[sparse-indices-shape2] - DeprecationWarning: datetime.utcfromtimestamp() is deprecated and scheduled...
FAILED mne/stats/tests/test_parametric.py::test_f_twoway_rm - pytest.PytestUnraisableExceptionWarning: Exception ignored in: <function tq...
FAILED mne/stats/tests/test_permutations.py::test_permutation_t_test - DeprecationWarning: datetime.utcfromtimestamp() is deprecated and scheduled...
FAILED mne/tests/test_annotations.py::test_crop - pytest.PytestUnraisableExceptionWarning: Exception ignored in: <function tq...
FAILED mne/tests/test_annotations.py::test_crop_more - pytest.PytestUnraisableExceptionWarning: Exception ignored in: <function tq...
FAILED mne/tests/test_chpi.py::test_simulate_calculate_head_pos_chpi - DeprecationWarning: datetime.utcfromtimestamp() is deprecated and scheduled...
FAILED mne/tests/test_cov.py::test_compute_whitener[True-True] - pytest.PytestUnraisableExceptionWarning: Exception ignored in: <function tq...
FAILED mne/time_frequency/tests/test_csd.py::test_csd_fourier - DeprecationWarning: datetime.utcfromtimestamp() is deprecated and scheduled...
FAILED mne/time_frequency/tests/test_csd.py::test_csd_multitaper - DeprecationWarning: datetime.utcfromtimestamp() is deprecated and scheduled...
FAILED mne/time_frequency/tests/test_csd.py::test_csd_morlet - DeprecationWarning: datetime.utcfromtimestamp() is deprecated and scheduled...
FAILED mne/time_frequency/tests/test_csd.py::test_csd_tfr - DeprecationWarning: datetime.utcfromtimestamp() is deprecated and scheduled...
FAILED mne/time_frequency/tests/test_tfr.py::test_plot_joint - pytest.PytestUnraisableExceptionWarning: Exception ignored in: <function tq...
FAILED mne/utils/tests/test_progressbar.py::test_progressbar - DeprecationWarning: datetime.utcfromtimestamp() is deprecated and scheduled...
FAILED mne/utils/tests/test_progressbar.py::test_progressbar_parallel_basic - DeprecationWarning: datetime.utcfromtimestamp() is deprecated and scheduled...
FAILED mne/utils/tests/test_progressbar.py::test_progressbar_parallel_advanced - DeprecationWarning: datetime.utcfromtimestamp() is deprecated and scheduled...
FAILED mne/utils/tests/test_progressbar.py::test_progressbar_parallel_more - DeprecationWarning: datetime.utcfromtimestamp() is deprecated and scheduled...
= 65 failed, 2302 passed, 968 skipped, 539 deselected, 1 xfailed, 3 warnings, 1 error in 609.04s (0:10:09) =
Adding verbosity to the tests revealed the following:
AttributeError: 'tqdm_asyncio' object has no attribute 'last_print_t'
That exception is ignored by several tests, but they are marked as failed.
E DeprecationWarning: datetime.utcfromtimestamp() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: datetime.fromtimestamp(timestamp, datetime.UTC).
This one also occurs several times in different tests.
Steps to reproduce
The tests are run in a mock chroot resembling Fedora 39. From the spec file it should be something like:
export MNE_SKIP_TESTING_DATASET_TESTS=true
export MNE_SKIP_NETWORK_TESTS=1
export MNE_DONTWRITE_HOME=true
export MNE_FORCE_SERIAL=true
pytest -v --durations=10 --timeout=180 -m "not (slowtest or pgtest)" \
--deselect mne/datasets/tests/test_datasets.py \
--deselect mne/utils/tests/test_numerics.py
Please note, that I wasn't able to reproduce all failures locally. My environment is still Python 3.11 (Fedora 37). Running the following:
```bash
python3 -m venv tests
. tests/bin/activate
python3 setup.py install
export MNE_SKIP_TESTING_DATASET_TESTS=true
export MNE_SKIP_NETWORK_TESTS=1
export MNE_DONTWRITE_HOME=true
export MNE_FORCE_SERIAL=true
pytest -v --durations=10 --timeout=180 -m "not (slowtest or pgtest)" \
--deselect mne/datasets/tests/test_datasets.py \
--deselect mne/utils/tests/test_numerics.py
resulted in:
XFAIL mne/viz/backends/tests/test_renderer.py::test_backend_environment_setup[foo]
FAILED mne/tests/test_line_endings.py::test_line_endings - AssertionError: Found 14 files with incorrect endings:
### Link to data
I have a [Copr build for rawhide](https://download.copr.fedorainfracloud.org/results/gui1ty/neuro-sig/fedora-rawhide-x86_64/06203645-python-mne/) which runs the tests as described above. It also prints the output of `mne sys_info` showing what's installed in the mock chroot. You can inspect the logs there in case I missed including some info.
I had to cancel the build since pytest was hanging at the end of testing, but `builder-live.log` has all the output.
### Expected results
- tests to proceed and complete (not hang)
- tests to succeed
### Actual results
- without `--timeout` tests hang
- tests fail with warnings/errors
### Additional information
This is what is present in my local mock chroot:
+ /usr/bin/python3 -m mne sys_info
Platform Linux-6.3.8-100.fc37.x86_64-x86_64-with-glibc2.37.9000
Python 3.12.0b4 (main, Jul 12 2023, 00:00:00) [GCC 13.1.1 20230614 (Red Hat 13.1.1-4)]
Executable /usr/bin/python3
CPU (8 cores)
Memory Unavailable (requires "psutil" package)
Core
├☑ mne 1.4.2
├☑ numpy 1.24.4 (OpenBLAS 0.3.21 with 8 threads)
├☑ scipy 1.10.1
├☑ matplotlib 3.7.2 (backend=agg)
├☑ pooch 1.5.2
└☑ jinja2 3.1.2
Numerical (optional)
├☑ sklearn 1.3.0
├☑ nibabel 5.1.0
├☑ nilearn 0.10.1
├☑ dipy 1.7.0
├☑ pandas 1.5.3
└☐ unavailable numba, openmeeg, cupy
Visualization (optional)
├☑ vtk 9.2.6
└☐ unavailable pyvista, pyvistaqt, ipyvtklink, qtpy, ipympl, pyqtgraph, mne-qt-browser
Ecosystem (optional)
└☐ unavailable mne-bids, mne-nirs, mne-features, mne-connectivity, mne-icalabel, mne-bids-pipeline
Copr reports the following:
Platform Linux-6.3.5-200.fc38.x86_64-x86_64-with-glibc2.37.9000
Python 3.12.0b4 (main, Jul 12 2023, 00:00:00) [GCC 13.1.1 20230614 (Red Hat 13.1.1-4)]
Executable /usr/bin/python3
CPU (2 cores)
Memory Unavailable (requires "psutil" package)
Core
├☑ mne 1.4.2
├☑ numpy 1.24.4 (OpenBLAS 0.3.21 with 2 threads)
├☑ scipy 1.10.1
├☑ matplotlib 3.7.2 (backend=agg)
├☑ pooch 1.5.2
└☑ jinja2 3.1.2
Numerical (optional)
├☑ sklearn 1.3.0
├☑ nibabel 5.1.0
├☑ nilearn 0.10.1
├☑ dipy 1.7.0
├☑ pandas 1.5.3
└☐ unavailable numba, openmeeg, cupy
Visualization (optional)
├☑ vtk 9.2.6
└☐ unavailable pyvista, pyvistaqt, ipyvtklink, qtpy, ipympl, pyqtgraph, mne-qt-browser
Ecosystem (optional)
└☐ unavailable mne-bids, mne-nirs, mne-features, mne-connectivity, mne-icalabel, mne-bids-pipeline
Description of the problem
I'm busy upgrading MNE in Fedora to version 1.4.2. The package builds fine, but there are issues with some tests. In Fedora Rawhide Python 3.12 and Cython 3.0.0 have recently landed.
Tests just hung forever in our build environment. I'm currently running tests verbosely to see if it issues any warnings / errors. I also added
--timeout=180topytestin order to let the tests complete.It was
mne/stats/tests/test_cluster_level.py::test_thresholds[NumPy]test that just hung and needed the timeout for tests to proceed.Here is the summary of test failures:
Adding verbosity to the tests revealed the following:
That exception is ignored by several tests, but they are marked as failed.
This one also occurs several times in different tests.
Steps to reproduce
resulted in: