Braindecode 1.3.2.dev182822510__tar.gz → 1.3.2.dev183330317__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (161) hide show
  1. {braindecode-1.3.2.dev182822510/braindecode.egg-info → braindecode-1.3.2.dev183330317}/PKG-INFO +1 -1
  2. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183330317}/braindecode/datasets/base.py +1 -27
  3. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183330317}/braindecode/datasets/bids/hub.py +73 -143
  4. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183330317}/braindecode/datasets/bids/hub_io.py +4 -12
  5. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183330317}/braindecode/datautil/hub_formats.py +1 -8
  6. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183330317}/braindecode/preprocessing/windowers.py +2 -7
  7. braindecode-1.3.2.dev183330317/braindecode/version.py +1 -0
  8. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183330317}/braindecode/visualization/gradients.py +7 -7
  9. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183330317/braindecode.egg-info}/PKG-INFO +1 -1
  10. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183330317}/docs/whats_new.rst +1 -9
  11. braindecode-1.3.2.dev182822510/braindecode/version.py +0 -1
  12. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183330317}/LICENSE.txt +0 -0
  13. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183330317}/MANIFEST.in +0 -0
  14. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183330317}/NOTICE.txt +0 -0
  15. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183330317}/README.rst +0 -0
  16. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183330317}/braindecode/__init__.py +0 -0
  17. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183330317}/braindecode/augmentation/__init__.py +0 -0
  18. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183330317}/braindecode/augmentation/base.py +0 -0
  19. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183330317}/braindecode/augmentation/functional.py +0 -0
  20. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183330317}/braindecode/augmentation/transforms.py +0 -0
  21. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183330317}/braindecode/classifier.py +0 -0
  22. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183330317}/braindecode/datasets/__init__.py +0 -0
  23. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183330317}/braindecode/datasets/bbci.py +0 -0
  24. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183330317}/braindecode/datasets/bcicomp.py +0 -0
  25. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183330317}/braindecode/datasets/bids/__init__.py +0 -0
  26. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183330317}/braindecode/datasets/bids/datasets.py +0 -0
  27. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183330317}/braindecode/datasets/bids/format.py +0 -0
  28. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183330317}/braindecode/datasets/bids/hub_format.py +0 -0
  29. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183330317}/braindecode/datasets/bids/hub_validation.py +0 -0
  30. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183330317}/braindecode/datasets/bids/iterable.py +0 -0
  31. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183330317}/braindecode/datasets/chb_mit.py +0 -0
  32. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183330317}/braindecode/datasets/mne.py +0 -0
  33. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183330317}/braindecode/datasets/moabb.py +0 -0
  34. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183330317}/braindecode/datasets/nmt.py +0 -0
  35. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183330317}/braindecode/datasets/registry.py +0 -0
  36. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183330317}/braindecode/datasets/siena.py +0 -0
  37. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183330317}/braindecode/datasets/sleep_physio_challe_18.py +0 -0
  38. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183330317}/braindecode/datasets/sleep_physionet.py +0 -0
  39. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183330317}/braindecode/datasets/tuh.py +0 -0
  40. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183330317}/braindecode/datasets/utils.py +0 -0
  41. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183330317}/braindecode/datasets/xy.py +0 -0
  42. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183330317}/braindecode/datautil/__init__.py +0 -0
  43. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183330317}/braindecode/datautil/channel_utils.py +0 -0
  44. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183330317}/braindecode/datautil/serialization.py +0 -0
  45. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183330317}/braindecode/datautil/util.py +0 -0
  46. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183330317}/braindecode/eegneuralnet.py +0 -0
  47. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183330317}/braindecode/functional/__init__.py +0 -0
  48. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183330317}/braindecode/functional/functions.py +0 -0
  49. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183330317}/braindecode/functional/initialization.py +0 -0
  50. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183330317}/braindecode/models/__init__.py +0 -0
  51. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183330317}/braindecode/models/atcnet.py +0 -0
  52. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183330317}/braindecode/models/attentionbasenet.py +0 -0
  53. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183330317}/braindecode/models/attn_sleep.py +0 -0
  54. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183330317}/braindecode/models/base.py +0 -0
  55. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183330317}/braindecode/models/bendr.py +0 -0
  56. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183330317}/braindecode/models/biot.py +0 -0
  57. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183330317}/braindecode/models/brainmodule.py +0 -0
  58. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183330317}/braindecode/models/cbramod.py +0 -0
  59. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183330317}/braindecode/models/config.py +0 -0
  60. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183330317}/braindecode/models/contrawr.py +0 -0
  61. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183330317}/braindecode/models/ctnet.py +0 -0
  62. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183330317}/braindecode/models/deep4.py +0 -0
  63. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183330317}/braindecode/models/deepsleepnet.py +0 -0
  64. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183330317}/braindecode/models/eegconformer.py +0 -0
  65. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183330317}/braindecode/models/eeginception_erp.py +0 -0
  66. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183330317}/braindecode/models/eeginception_mi.py +0 -0
  67. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183330317}/braindecode/models/eegitnet.py +0 -0
  68. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183330317}/braindecode/models/eegminer.py +0 -0
  69. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183330317}/braindecode/models/eegnet.py +0 -0
  70. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183330317}/braindecode/models/eegnex.py +0 -0
  71. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183330317}/braindecode/models/eegpt.py +0 -0
  72. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183330317}/braindecode/models/eegsimpleconv.py +0 -0
  73. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183330317}/braindecode/models/eegsym.py +0 -0
  74. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183330317}/braindecode/models/eegtcnet.py +0 -0
  75. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183330317}/braindecode/models/fbcnet.py +0 -0
  76. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183330317}/braindecode/models/fblightconvnet.py +0 -0
  77. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183330317}/braindecode/models/fbmsnet.py +0 -0
  78. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183330317}/braindecode/models/hybrid.py +0 -0
  79. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183330317}/braindecode/models/ifnet.py +0 -0
  80. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183330317}/braindecode/models/labram.py +0 -0
  81. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183330317}/braindecode/models/luna.py +0 -0
  82. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183330317}/braindecode/models/medformer.py +0 -0
  83. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183330317}/braindecode/models/msvtnet.py +0 -0
  84. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183330317}/braindecode/models/patchedtransformer.py +0 -0
  85. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183330317}/braindecode/models/reve.py +0 -0
  86. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183330317}/braindecode/models/sccnet.py +0 -0
  87. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183330317}/braindecode/models/shallow_fbcsp.py +0 -0
  88. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183330317}/braindecode/models/signal_jepa.py +0 -0
  89. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183330317}/braindecode/models/sinc_shallow.py +0 -0
  90. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183330317}/braindecode/models/sleep_stager_blanco_2020.py +0 -0
  91. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183330317}/braindecode/models/sleep_stager_chambon_2018.py +0 -0
  92. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183330317}/braindecode/models/sparcnet.py +0 -0
  93. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183330317}/braindecode/models/sstdpn.py +0 -0
  94. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183330317}/braindecode/models/summary.csv +0 -0
  95. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183330317}/braindecode/models/syncnet.py +0 -0
  96. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183330317}/braindecode/models/tcn.py +0 -0
  97. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183330317}/braindecode/models/tidnet.py +0 -0
  98. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183330317}/braindecode/models/tsinception.py +0 -0
  99. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183330317}/braindecode/models/usleep.py +0 -0
  100. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183330317}/braindecode/models/util.py +0 -0
  101. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183330317}/braindecode/modules/__init__.py +0 -0
  102. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183330317}/braindecode/modules/activation.py +0 -0
  103. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183330317}/braindecode/modules/attention.py +0 -0
  104. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183330317}/braindecode/modules/blocks.py +0 -0
  105. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183330317}/braindecode/modules/convolution.py +0 -0
  106. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183330317}/braindecode/modules/filter.py +0 -0
  107. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183330317}/braindecode/modules/layers.py +0 -0
  108. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183330317}/braindecode/modules/linear.py +0 -0
  109. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183330317}/braindecode/modules/parametrization.py +0 -0
  110. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183330317}/braindecode/modules/stats.py +0 -0
  111. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183330317}/braindecode/modules/util.py +0 -0
  112. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183330317}/braindecode/modules/wrapper.py +0 -0
  113. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183330317}/braindecode/preprocessing/__init__.py +0 -0
  114. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183330317}/braindecode/preprocessing/eegprep_preprocess.py +0 -0
  115. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183330317}/braindecode/preprocessing/mne_preprocess.py +0 -0
  116. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183330317}/braindecode/preprocessing/preprocess.py +0 -0
  117. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183330317}/braindecode/preprocessing/util.py +0 -0
  118. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183330317}/braindecode/regressor.py +0 -0
  119. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183330317}/braindecode/samplers/__init__.py +0 -0
  120. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183330317}/braindecode/samplers/base.py +0 -0
  121. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183330317}/braindecode/samplers/ssl.py +0 -0
  122. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183330317}/braindecode/training/__init__.py +0 -0
  123. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183330317}/braindecode/training/callbacks.py +0 -0
  124. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183330317}/braindecode/training/losses.py +0 -0
  125. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183330317}/braindecode/training/scoring.py +0 -0
  126. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183330317}/braindecode/util.py +0 -0
  127. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183330317}/braindecode/visualization/__init__.py +0 -0
  128. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183330317}/braindecode/visualization/confusion_matrices.py +0 -0
  129. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183330317}/braindecode.egg-info/SOURCES.txt +0 -0
  130. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183330317}/braindecode.egg-info/dependency_links.txt +0 -0
  131. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183330317}/braindecode.egg-info/requires.txt +0 -0
  132. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183330317}/braindecode.egg-info/top_level.txt +0 -0
  133. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183330317}/docs/Makefile +0 -0
  134. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183330317}/docs/_templates/autosummary/class.rst +0 -0
  135. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183330317}/docs/_templates/autosummary/class_in_subdir.rst +0 -0
  136. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183330317}/docs/_templates/autosummary/function.rst +0 -0
  137. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183330317}/docs/_templates/autosummary/function_in_subdir.rst +0 -0
  138. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183330317}/docs/api.rst +0 -0
  139. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183330317}/docs/cite.rst +0 -0
  140. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183330317}/docs/conf.py +0 -0
  141. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183330317}/docs/help.rst +0 -0
  142. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183330317}/docs/index.rst +0 -0
  143. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183330317}/docs/install/install.rst +0 -0
  144. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183330317}/docs/install/install_pip.rst +0 -0
  145. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183330317}/docs/install/install_source.rst +0 -0
  146. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183330317}/docs/models/categorization/attention.rst +0 -0
  147. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183330317}/docs/models/categorization/channel.rst +0 -0
  148. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183330317}/docs/models/categorization/convolution.rst +0 -0
  149. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183330317}/docs/models/categorization/filterbank.rst +0 -0
  150. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183330317}/docs/models/categorization/gnn.rst +0 -0
  151. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183330317}/docs/models/categorization/interpretable.rst +0 -0
  152. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183330317}/docs/models/categorization/lbm.rst +0 -0
  153. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183330317}/docs/models/categorization/recurrent.rst +0 -0
  154. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183330317}/docs/models/categorization/spd.rst +0 -0
  155. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183330317}/docs/models/models.rst +0 -0
  156. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183330317}/docs/models/models_categorization.rst +0 -0
  157. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183330317}/docs/models/models_table.rst +0 -0
  158. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183330317}/docs/models/models_visualization.rst +0 -0
  159. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183330317}/docs/sg_execution_times.rst +0 -0
  160. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183330317}/pyproject.toml +0 -0
  161. {braindecode-1.3.2.dev182822510 → braindecode-1.3.2.dev183330317}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: braindecode
3
- Version: 1.3.2.dev182822510
3
+ Version: 1.3.2.dev183330317
4
4
  Summary: Deep learning software to decode EEG, ECG or MEG signals
5
5
  Author-email: Robin Tibor Schirrmeister <robintibor@gmail.com>, Bruno Aristimunha Pinto <b.aristimunha@gmail.com>, Alexandre Gramfort <agramfort@meta.com>
6
6
  Maintainer-email: Alexandre Gramfort <agramfort@meta.com>, Bruno Aristimunha Pinto <b.aristimunha@gmail.com>, Robin Tibor Schirrmeister <robintibor@gmail.com>
@@ -617,15 +617,6 @@ class WindowsDataset(RecordDataset):
617
617
  last_target_only: bool = True,
618
618
  ):
619
619
  super().__init__(description, transform)
620
- self._fast_disk = self._can_use_fast_get_epoch_from_raw(windows)
621
- if not (self._fast_disk or windows.preload):
622
- warnings.warn(
623
- "The provided mne.Epochs object does not meet the requirements for "
624
- "fast epoch access. This may lead to slow data loading from disk. "
625
- "Consider preloading the epochs or checking the conditions in "
626
- "WindowsDataset._can_use_fast_get_epoch_from_raw.",
627
- UserWarning,
628
- )
629
620
  self.windows = windows
630
621
  self.last_target_only = last_target_only
631
622
  if targets_from not in ("metadata", "channels"):
@@ -642,20 +633,6 @@ class WindowsDataset(RecordDataset):
642
633
  self.raw_preproc_kwargs: list[dict[str, Any]] = []
643
634
  self.window_preproc_kwargs: list[dict[str, Any]] = []
644
635
 
645
- @staticmethod
646
- def _can_use_fast_get_epoch_from_raw(epochs: mne.BaseEpochs) -> bool:
647
- """Check if we can use the fast _get_epoch_from_raw method,
648
- or if we need to use the slow get_data method."""
649
- return (
650
- not epochs.preload
651
- and epochs._bad_dropped
652
- and epochs.detrend is None
653
- and not epochs._do_baseline # baseline is None
654
- and (epochs._decim == 1)
655
- and epochs._offset is None
656
- and epochs._projector is None
657
- )
658
-
659
636
  def __getitem__(self, index: int):
660
637
  """Get a window and its target.
661
638
 
@@ -673,10 +650,7 @@ class WindowsDataset(RecordDataset):
673
650
  np.ndarray
674
651
  Crop indices.
675
652
  """
676
- if self._fast_disk:
677
- X = self.windows._get_epoch_from_raw(index).astype("float32")
678
- else:
679
- X = self.windows.get_data(item=index)[0].astype("float32")
653
+ X = self.windows.get_data(item=index)[0].astype("float32")
680
654
  if self.transform is not None:
681
655
  X = self.transform(X)
682
656
  if self.targets_from == "metadata":
@@ -27,7 +27,6 @@ The format follows a BIDS-inspired sourcedata structure:
27
27
  #
28
28
  # License: BSD (3-clause)
29
29
 
30
- import contextlib
31
30
  import json
32
31
  import logging
33
32
  import tempfile
@@ -70,8 +69,6 @@ huggingface_hub = _soft_import(
70
69
 
71
70
  log = logging.getLogger(__name__)
72
71
 
73
- _LOCK_FILE = "format_info.json"
74
-
75
72
 
76
73
  class HubDatasetMixin:
77
74
  """
@@ -87,6 +84,7 @@ class HubDatasetMixin:
87
84
  >>> dataset = NMT(path=path, preload=True)
88
85
  >>> dataset.push_to_hub(
89
86
  ... repo_id="username/nmt-dataset",
87
+ ... commit_message="Add NMT dataset"
90
88
  ... )
91
89
  >>>
92
90
  >>> # Load dataset from Hub
@@ -98,14 +96,13 @@ class HubDatasetMixin:
98
96
  def push_to_hub(
99
97
  self,
100
98
  repo_id: str,
99
+ commit_message: Optional[str] = None,
101
100
  private: bool = False,
102
101
  token: Optional[str] = None,
102
+ create_pr: bool = False,
103
103
  compression: str = "blosc",
104
104
  compression_level: int = 5,
105
105
  pipeline_name: str = "braindecode",
106
- chunk_size: int = 10000,
107
- local_cache_dir: str | Path | None = None,
108
- **kwargs,
109
106
  ) -> str:
110
107
  """
111
108
  Upload the dataset to the Hugging Face Hub in BIDS-like Zarr format.
@@ -119,38 +116,20 @@ class HubDatasetMixin:
119
116
  ----------
120
117
  repo_id : str
121
118
  Repository ID on the Hugging Face Hub (e.g., "username/dataset-name").
119
+ commit_message : str | None
120
+ Commit message. If None, a default message is generated.
122
121
  private : bool, default=False
123
122
  Whether to create a private repository.
124
123
  token : str | None
125
124
  Hugging Face API token. If None, uses cached token.
125
+ create_pr : bool, default=False
126
+ Whether to create a Pull Request instead of directly committing.
126
127
  compression : str, default="blosc"
127
128
  Compression algorithm for Zarr. Options: "blosc", "zstd", "gzip", None.
128
129
  compression_level : int, default=5
129
130
  Compression level (0-9). Level 5 provides optimal balance.
130
131
  pipeline_name : str, default="braindecode"
131
132
  Name of the processing pipeline for BIDS sourcedata.
132
- chunk_size : int, default=10000
133
- Number of samples per chunk in Zarr. Larger chunk size will create fewer
134
- but larger files. Only used for RawDataset and EEGWindowsDataset (continuous data).
135
- With WindowsDataset (pre-cut epochs), each window is saved as a separate chunk.
136
- local_cache_dir : str | Path | None
137
- Local directory to use for temporary files during upload. If None, uses
138
- the system temp directory and cleans it up after upload. If provided,
139
- the directory is used as a persistent cache:
140
-
141
- - If the directory is empty (or does not exist), the cache is built
142
- there and a lock file (``format_info.json``) is written once
143
- the cache is complete, before the upload starts. The file
144
- contains the zarr conversion parameters as JSON.
145
- - If the lock file is present and its JSON parameters match the
146
- current call, cache creation is skipped and the upload resumes
147
- directly (useful for retrying interrupted uploads).
148
- - If the lock file is present but its JSON parameters differ from
149
- the current call, a ``ValueError`` is raised.
150
- - If the directory is non-empty but the lock file is absent, a
151
- ``ValueError`` is raised listing the files found.
152
- **kwargs
153
- Additional arguments passed to huggingface_hub.upload_large_folder().
154
133
 
155
134
  Returns
156
135
  -------
@@ -170,6 +149,7 @@ class HubDatasetMixin:
170
149
  >>> # Upload with BIDS-like structure
171
150
  >>> url = dataset.push_to_hub(
172
151
  ... repo_id="myusername/nmt-dataset",
152
+ ... commit_message="Upload NMT EEG dataset"
173
153
  ... )
174
154
  """
175
155
  if huggingface_hub is False or zarr is False:
@@ -179,12 +159,13 @@ class HubDatasetMixin:
179
159
  )
180
160
 
181
161
  # Create API instance
182
- hf_api = huggingface_hub.HfApi(token=token)
162
+ _ = huggingface_hub.HfApi(token=token)
183
163
 
184
164
  # Create repository if it doesn't exist
185
165
  try:
186
- hf_api.create_repo(
166
+ huggingface_hub.create_repo(
187
167
  repo_id=repo_id,
168
+ token=token,
188
169
  private=private,
189
170
  repo_type="dataset",
190
171
  exist_ok=True,
@@ -192,68 +173,74 @@ class HubDatasetMixin:
192
173
  except Exception as e:
193
174
  raise RuntimeError(f"Failed to create repository: {e}")
194
175
 
195
- format_info = self._get_format_info_inline()
196
- format_info_lock = {
197
- "format": "zarr",
198
- "pipeline_name": pipeline_name,
199
- "compression": compression,
200
- "compression_level": compression_level,
201
- "chunk_size": chunk_size,
202
- "braindecode_version": braindecode.__version__,
203
- **format_info,
204
- }
176
+ # Create a temporary directory for upload
177
+ with tempfile.TemporaryDirectory() as tmpdir:
178
+ tmp_path = Path(tmpdir)
205
179
 
206
- # Determine upload directory and whether to build the cache
207
- with contextlib.ExitStack() as stack:
208
- if local_cache_dir is None:
209
- tmpdir = stack.enter_context(tempfile.TemporaryDirectory())
210
- tmp_path = Path(tmpdir)
211
- build_cache = True
212
- else:
213
- tmp_path = Path(local_cache_dir)
214
- lock_path = tmp_path / _LOCK_FILE
215
- if lock_path.exists():
216
- with open(lock_path, "r", encoding="utf-8") as _f:
217
- _lock_params = json.load(_f)
218
- if _lock_params != format_info_lock:
219
- raise ValueError(
220
- f"Lock file found at '{lock_path}' but its "
221
- f"parameters {_lock_params} differ from the "
222
- f"current call parameters {format_info_lock}. "
223
- "Provide an empty directory or match the "
224
- "original parameters."
225
- )
226
- log.info(
227
- f"Lock file found at '{lock_path}', skipping cache "
228
- "creation and resuming upload."
229
- )
230
- build_cache = False
231
- else:
232
- if tmp_path.exists():
233
- existing = list(tmp_path.iterdir())
234
- if existing:
235
- entries = ", ".join(p.name for p in existing)
236
- raise ValueError(
237
- f"local_cache_dir '{tmp_path}' is not empty and "
238
- f"has no lock file. Found: {entries}. Provide an "
239
- "empty directory or one previously prepared by "
240
- "push_to_hub()."
241
- )
242
- else:
243
- tmp_path.mkdir(parents=True)
244
- build_cache = True
245
-
246
- if build_cache:
247
- self._build_local_cache(tmp_path, format_info_lock)
180
+ # Create BIDS-like sourcedata structure
181
+ log.info("Creating BIDS-like sourcedata structure...")
182
+ bids_layout = hub_format.BIDSSourcedataLayout(
183
+ tmp_path, pipeline_name=pipeline_name
184
+ )
185
+ sourcedata_dir = bids_layout.create_structure()
186
+
187
+ # Save dataset_description.json
188
+ bids_layout.save_dataset_description()
189
+
190
+ # Save participants.tsv
191
+ descriptions = [ds.description for ds in self.datasets]
192
+ bids_layout.save_participants(descriptions)
193
+
194
+ # Save BIDS sidecar files for each recording
195
+ self._save_bids_sidecar_files(bids_layout)
196
+
197
+ # Convert dataset to Zarr format inside sourcedata
198
+ log.info("Converting dataset to Zarr format...")
199
+ dataset_path = sourcedata_dir / "dataset.zarr"
200
+
201
+ self._convert_to_zarr_inline(
202
+ dataset_path,
203
+ compression,
204
+ compression_level,
205
+ )
206
+
207
+ # Save dataset metadata (README.md)
208
+ self._save_dataset_card(tmp_path)
209
+
210
+ # Save format info
211
+ format_info_path = tmp_path / "format_info.json"
212
+ with open(format_info_path, "w", encoding="utf-8") as f:
213
+ format_info = self._get_format_info_inline()
214
+ json.dump(
215
+ {
216
+ "format": "zarr",
217
+ "pipeline_name": pipeline_name,
218
+ "compression": compression,
219
+ "compression_level": compression_level,
220
+ "braindecode_version": braindecode.__version__,
221
+ **format_info,
222
+ },
223
+ f,
224
+ indent=2,
225
+ )
226
+
227
+ # Default commit message
228
+ if commit_message is None:
229
+ commit_message = (
230
+ f"Upload EEG dataset in BIDS-like "
231
+ f"Zarr format ({len(self.datasets)} recordings)"
232
+ )
248
233
 
249
234
  # Upload folder to Hub
250
235
  log.info(f"Uploading to Hugging Face Hub ({repo_id})...")
251
236
  try:
252
- url = hf_api.upload_large_folder(
237
+ url = huggingface_hub.upload_folder(
253
238
  repo_id=repo_id,
254
239
  folder_path=str(tmp_path),
255
240
  repo_type="dataset",
256
- **kwargs,
241
+ commit_message=commit_message,
242
+ token=token,
243
+ create_pr=create_pr,
257
244
  )
258
245
  log.info(f"Dataset uploaded successfully to {repo_id}")
259
246
  log.info(f"URL: https://huggingface.co/datasets/{repo_id}")
@@ -261,55 +248,6 @@ class HubDatasetMixin:
261
248
  except Exception as e:
262
249
  raise RuntimeError(f"Failed to upload dataset: {e}")
263
250
 
264
- def _build_local_cache(
265
- self,
266
- tmp_path,
267
- format_info_lock,
268
- ):
269
- """Build the local cache directory with the dataset in Zarr format and BIDS-like structure.
270
- This folder will be uploaded to the Hub"""
271
- compression = format_info_lock["compression"]
272
- compression_level = format_info_lock["compression_level"]
273
- pipeline_name = format_info_lock["pipeline_name"]
274
- chunk_size = format_info_lock["chunk_size"]
275
-
276
- # Create BIDS-like sourcedata structure
277
- log.info("Creating BIDS-like sourcedata structure...")
278
- bids_layout = hub_format.BIDSSourcedataLayout(
279
- tmp_path, pipeline_name=pipeline_name
280
- )
281
- sourcedata_dir = bids_layout.create_structure()
282
-
283
- # Save dataset_description.json
284
- bids_layout.save_dataset_description()
285
-
286
- # Save participants.tsv
287
- descriptions = [ds.description for ds in self.datasets]
288
- bids_layout.save_participants(descriptions)
289
-
290
- # Save BIDS sidecar files for each recording
291
- self._save_bids_sidecar_files(bids_layout)
292
-
293
- # Convert dataset to Zarr format inside sourcedata
294
- log.info("Converting dataset to Zarr format...")
295
- dataset_path = sourcedata_dir / "dataset.zarr"
296
-
297
- self._convert_to_zarr_inline(
298
- dataset_path,
299
- compression,
300
- compression_level,
301
- chunk_size,
302
- )
303
-
304
- # Save dataset metadata (README.md)
305
- self._save_dataset_card(tmp_path)
306
-
307
- # Save format info
308
- # This marks the cache as complete
309
- format_info_path = tmp_path / _LOCK_FILE
310
- with open(format_info_path, "w", encoding="utf-8") as f:
311
- json.dump(format_info_lock, f, indent=2)
312
-
313
251
  def _save_dataset_card(self, path: Path, bids_inspired: bool = True) -> None:
314
252
  """Generate and save a dataset card (README.md) with metadata.
315
253
 
@@ -527,7 +465,7 @@ class HubDatasetMixin:
527
465
  )
528
466
 
529
467
  # Load format info
530
- format_info_path = Path(dataset_dir) / _LOCK_FILE
468
+ format_info_path = Path(dataset_dir) / "format_info.json"
531
469
  if format_info_path.exists():
532
470
  with open(format_info_path, "r") as f:
533
471
  format_info = json.load(f)
@@ -657,7 +595,6 @@ class HubDatasetMixin:
657
595
  output_path: Path,
658
596
  compression: str,
659
597
  compression_level: int,
660
- chunk_size: int = 10000,
661
598
  ) -> None:
662
599
  """Convert dataset to Zarr format (inline implementation)."""
663
600
 
@@ -745,7 +682,6 @@ class HubDatasetMixin:
745
682
  targets_from,
746
683
  last_target_only,
747
684
  compressor,
748
- chunk_size,
749
685
  )
750
686
 
751
687
  elif dataset_type == "RawDataset":
@@ -757,13 +693,7 @@ class HubDatasetMixin:
757
693
 
758
694
  # Save using inlined function
759
695
  _save_raw_to_zarr(
760
- grp,
761
- raw,
762
- description,
763
- info_dict,
764
- target_name,
765
- compressor,
766
- chunk_size,
696
+ grp, raw, description, info_dict, target_name, compressor
767
697
  )
768
698
 
769
699
  def _get_format_info_inline(self):
@@ -70,15 +70,7 @@ def _save_windows_to_zarr(
70
70
 
71
71
 
72
72
  def _save_eegwindows_to_zarr(
73
- grp,
74
- raw,
75
- metadata,
76
- description,
77
- info,
78
- targets_from,
79
- last_target_only,
80
- compressor,
81
- chunk_size,
73
+ grp, raw, metadata, description, info, targets_from, last_target_only, compressor
82
74
  ):
83
75
  """Save EEG continuous raw data to Zarr group (low-level function)."""
84
76
  continuous_data = raw.get_data()
@@ -88,7 +80,7 @@ def _save_eegwindows_to_zarr(
88
80
  grp.create_array(
89
81
  "data",
90
82
  data=continuous_float,
91
- chunks=(continuous_float.shape[0], min(chunk_size, continuous_float.shape[1])),
83
+ chunks=(continuous_float.shape[0], min(10000, continuous_float.shape[1])),
92
84
  compressors=compressors_list,
93
85
  )
94
86
 
@@ -151,7 +143,7 @@ def _load_eegwindows_from_zarr(grp, preload):
151
143
  return data, metadata, description, info_dict, targets_from, last_target_only
152
144
 
153
145
 
154
- def _save_raw_to_zarr(grp, raw, description, info, target_name, compressor, chunk_size):
146
+ def _save_raw_to_zarr(grp, raw, description, info, target_name, compressor):
155
147
  """Save RawDataset continuous raw data to Zarr group (low-level function)."""
156
148
  continuous_data = raw.get_data()
157
149
  continuous_float = continuous_data.astype(np.float32)
@@ -160,7 +152,7 @@ def _save_raw_to_zarr(grp, raw, description, info, target_name, compressor, chun
160
152
  grp.create_array(
161
153
  "data",
162
154
  data=continuous_float,
163
- chunks=(continuous_float.shape[0], min(chunk_size, continuous_float.shape[1])),
155
+ chunks=(continuous_float.shape[0], min(10000, continuous_float.shape[1])),
164
156
  compressors=compressors_list,
165
157
  )
166
158
 
@@ -36,7 +36,6 @@ def convert_to_zarr(
36
36
  output_path: Union[str, Path],
37
37
  compression: str = "blosc",
38
38
  compression_level: int = 5,
39
- chunk_size: int = 10000,
40
39
  overwrite: bool = False,
41
40
  ) -> Path:
42
41
  """Convert BaseConcatDataset to Zarr format.
@@ -59,10 +58,6 @@ def convert_to_zarr(
59
58
  blosc uses zstd codec by default, providing best balance of speed and compression.
60
59
  compression_level : int, default=5
61
60
  Compression level (0-9). Level 5 provides optimal balance based on benchmarks.
62
- chunk_size : int, default=10000
63
- Number of samples per chunk in Zarr. Larger chunk size will create fewer
64
- but larger files. Only used for RawDataset and EEGWindowsDataset (continuous data).
65
- With WindowsDataset (pre-cut epochs), each window is saved as a separate chunk.
66
61
  overwrite : bool, default=False
67
62
  Whether to overwrite existing directory.
68
63
 
@@ -101,9 +96,7 @@ def convert_to_zarr(
101
96
  shutil.rmtree(output_path)
102
97
 
103
98
  # Delegate to HubDatasetMixin method
104
- dataset._convert_to_zarr_inline(
105
- output_path, compression, compression_level, chunk_size
106
- )
99
+ dataset._convert_to_zarr_inline(output_path, compression, compression_level)
107
100
 
108
101
  return output_path
109
102
 
@@ -12,7 +12,6 @@
12
12
  # Mohammed Fattouh <mo.fattouh@gmail.com>
13
13
  # Robin Schirrmeister <robintibor@gmail.com>
14
14
  # Matthew Chen <matt.chen42601@gmail.com>
15
- # Sarthak Tayal <sarthaktayal2@gmail.com>
16
15
  #
17
16
  # License: BSD (3-clause)
18
17
 
@@ -1046,12 +1045,8 @@ def _create_windows_from_target_channels(
1046
1045
  stop = ds.raw.n_times + ds.raw.first_samp
1047
1046
 
1048
1047
  target = ds.raw.get_data(picks="misc")
1049
-
1050
- # check all misc channels for valid targets, not just the first one.
1051
- # when multiple target channels exist, some may have values at timepoints
1052
- # where others are nan. using any() across channels catches all of them.
1053
- has_target = np.any(~np.isnan(target), axis=0)
1054
- stops = np.nonzero(has_target)[0] + 1
1048
+ # TODO: handle multi targets present only for some events
1049
+ stops = np.nonzero((~np.isnan(target[0, :])))[0] + 1
1055
1050
  stops = stops[(stops < stop) & (stops >= window_size_samples)]
1056
1051
  stops = stops.astype(int)
1057
1052
  metadata = pd.DataFrame(
@@ -0,0 +1 @@
1
+ __version__ = "1.3.2.dev183330317"
@@ -1,5 +1,4 @@
1
1
  # Authors: Robin Schirrmeister <robintibor@gmail.com>
2
- # Sarthak Tayal <sarthaktayal2@gmail.com>
3
2
  #
4
3
  # License: BSD (3-clause)
5
4
 
@@ -36,17 +35,18 @@ def compute_amplitude_gradients_for_X(model, X):
36
35
  amps_th = to_tensor(amps.astype(np.float32), device=device).requires_grad_(True)
37
36
  phases_th = to_tensor(phases.astype(np.float32), device=device).requires_grad_(True)
38
37
 
39
- # rebuild fft coefficients from amplitude and phase as real valued pairs,
40
- # convert to complex, and invert back to the time domain.
41
- # torch.irfft was removed after being deprecated since pytorch 1.7,
42
- # so we use torch.fft.irfft which expects complex input directly.
43
38
  fft_coefs = amps_th.unsqueeze(-1) * torch.stack(
44
39
  (torch.cos(phases_th), torch.sin(phases_th)), dim=-1
45
40
  )
46
41
  fft_coefs = fft_coefs.squeeze(3)
47
42
 
48
- complex_fft_coefs = torch.view_as_complex(fft_coefs)
49
- iffted = torch.fft.irfft(complex_fft_coefs, n=X.shape[2], dim=2)
43
+ try:
44
+ complex_fft_coefs = torch.view_as_complex(fft_coefs)
45
+ iffted = torch.fft.irfft(complex_fft_coefs, n=X.shape[2], dim=2)
46
+ except AttributeError:
47
+ iffted = torch.irfft( # Deprecated since 1.7
48
+ fft_coefs, signal_ndim=1, signal_sizes=(X.shape[2],)
49
+ )
50
50
 
51
51
  outs = model(iffted)
52
52
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: braindecode
3
- Version: 1.3.2.dev182822510
3
+ Version: 1.3.2.dev183330317
4
4
  Summary: Deep learning software to decode EEG, ECG or MEG signals
5
5
  Author-email: Robin Tibor Schirrmeister <robintibor@gmail.com>, Bruno Aristimunha Pinto <b.aristimunha@gmail.com>, Alexandre Gramfort <agramfort@meta.com>
6
6
  Maintainer-email: Alexandre Gramfort <agramfort@meta.com>, Bruno Aristimunha Pinto <b.aristimunha@gmail.com>, Robin Tibor Schirrmeister <robintibor@gmail.com>
@@ -54,7 +54,6 @@ Enhancements
54
54
  (:gh:`941` by `Aman Srivastava`_).
55
55
  - Per-event-type windowing parameters in :func:`braindecode.preprocessing.windowers.create_windows_from_events` (:gh:`942` by `Pierre Guetschel`_)
56
56
  - Add ``use_mne_epochs`` support to :func:`braindecode.preprocessing.windowers.create_fixed_length_windows` (:gh:`943` by `Pierre Guetschel`_)
57
- - Faster loading from epochs on disk with :class:`braindecode.datasets.base.WindowsDataset` (:gh:`944` by `Pierre Guetschel`_)
58
57
 
59
58
  API changes
60
59
  ============
@@ -66,9 +65,6 @@ Requirements
66
65
 
67
66
  Bugs
68
67
  =====
69
- - Fix multi-target channel windowing in :func:`braindecode.preprocessing.windowers.create_windows_from_target_channels`
70
- to use the union of valid target positions across all misc channels instead of only the first channel
71
- (by `Sarthak Tayal`_)
72
68
  - Fix :func:`braindecode.preprocessing.preprocess.filterbank` to preserve info fields
73
69
  (``description``, ``line_freq``, ``device_info``, etc.) when creating filtered copies,
74
70
  avoiding merge conflicts in MNE when adding channels (:gh:`928` by `Bruno Aristimunha`_)
@@ -77,13 +73,10 @@ Bugs
77
73
  - Fix Zenodo citation: update to global concept DOI and add BibTeX/APA citation formats
78
74
  in ``docs/cite.rst``, ``README.rst``, ``CITATION.cff``, and ``docs/conf.py``
79
75
  (:gh:`937` by `Bruno Aristimunha`_)
80
- - Push large datasets to HuggingFace Hub using :func:`huggingface_hub.upload_large_folder` to avoid limitations, and allow resuming downloads (:gh:`945` by `Pierre Guetschel`_)
81
76
 
82
77
  Code health
83
78
  ============
84
- - Remove deprecated ``torch.irfft`` fallback in :func:`braindecode.visualization.gradients.compute_amplitude_gradients_for_X`,
85
- now uses ``torch.fft.irfft`` directly since braindecode requires ``torch>=2.2``
86
- (by `Sarthak Tayal`_)
79
+ - None yet.
87
80
 
88
81
 
89
82
  Current 1.3.2 (stable)
@@ -831,4 +824,3 @@ Authors
831
824
  .. _Aniela Bulicz: https://github.com/AryaDro
832
825
  .. _Mattew Chew: https://github.com/MatthewChen37
833
826
  .. _Aman Srivastava: https://github.com/aman-coder03
834
- .. _Sarthak Tayal: https://github.com/tayal-sarthak
@@ -1 +0,0 @@
1
- __version__ = "1.3.2.dev182822510"