You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The JupyterLite docs build currently downloads the full sample dataset (and a few others) just to serve a small handful of files to the browser notebooks. Those files then get bundled into the documentation build, which bloats it.
Streaming directly from OSF at runtime isn't possible: Pyodide runs in a web worker and OSF doesn't send CORS headers, so the fetch fails from the browser.
Proposal
Create a small curated dataset — lite-data — containing only the files the JupyterLite notebooks actually need (a slim subset of sample). Host it on OSF as its own dataset.
Since OSF supports downloading individual files, we could add something like mne.datasets.lite_data that fetches only the required files rather than pulling the whole sample dataset. Any mne.datasets.* calls in the notebooks could then be pointed at lite-data instead of the full dataset.
This would cut down both the download at build time and what gets bundled with the docs.
Relevant code: mne/datasets/_fetch.py (uses pooch) and mne/datasets/utils/.
Hi @teonbrooks, I'd like to work on this if it's still open.
My approach: audit the JupyterLite notebooks to identify the exact files from sample (and any other datasets) they actually touch, curate those into a new lite-data OSF project, then add a mne.datasets.lite_data fetcher in mne/datasets/_fetch.py following the existing pooch-based pattern used for other datasets. I'll update the affected notebooks to point at lite_data instead of the full dataset, and check the docs build size before/after to confirm the reduction.
I'll start by going through PR #13925 and the notebooks under the JupyterLite docs build to scope the file list.
hey @natinew77-creator, I agree with the approach to create the mne.datasets.lite_data fetcher. this way we can rely on the same data source but speed up the build and the files needed for the examples to run.
we can add this as one of the subtasks for the #13929.
hey @natinew77-creator, I agree with the approach to create the mne.datasets.lite_data fetcher. this way we can rely on the same data source but speed up the build and the files needed for the examples to run.
we can add this as one of the subtasks for the #13929.
Thanks @teonbrooks! Will do, I'll track it under #13929 and start on the lite_data fetcher, using the file list I already scoped out in #13925.
@larsoner or @drammock, for the Jupyterlite support, we would like to host a subset of the sample dataset. we were planning to use the original files and just point to those but @natinew77-creator pointed out to me that they're all currently zipped on OSF.
I suspect this means we would need to re-host a small version. how should we go about hosting this? within the same project?
It's trivial for me to upload a new .tar.gz to the MNE org on OSF. Just upload what you want to DropBox or somewhere else, I'll download it, and then add it to osf.io. If we end up needing to iterate more I could give you access as well @teonbrooks
It's trivial for me to upload a new .tar.gz to the MNE org on OSF. Just upload what you want to DropBox or somewhere else, I'll download it, and then add it to osf.io. If we end up needing to iterate more I could give you access as well @teonbrooks
One refinement worth noting: the build resolves each file from the real dataset first and falls back to the curated archive. The archive only holds what it was published with, so files added to the build afterwards were silently going missing. This way new files resolve straight away, and the archive still covers builds without the full datasets, which keeps the original goal of not downloading several GB.
If the archive is refreshed to cover everything the build needs, that fallback can go and the curated set becomes the single source again.
Activity
palakbhati commentedon Jul 11, 2026
Hi @teonbrooks, I'd like to work on this if it's still open.
My approach: audit the JupyterLite notebooks to identify the exact files from
sample(and any other datasets) they actually touch, curate those into a newlite-dataOSF project, then add amne.datasets.lite_datafetcher inmne/datasets/_fetch.pyfollowing the existing pooch-based pattern used for other datasets. I'll update the affected notebooks to point atlite_datainstead of the full dataset, and check the docs build size before/after to confirm the reduction.I'll start by going through PR #13925 and the notebooks under the JupyterLite docs build to scope the file list.
drammock commentedon Jul 11, 2026
@palakbhati this is party of an ongoing GSoC project by @natinew77-creator, so it would be better if you chose an issue not related to jupyterlite
teonbrooks commentedon Jul 17, 2026
hey @natinew77-creator, I agree with the approach to create the
mne.datasets.lite_datafetcher. this way we can rely on the same data source but speed up the build and the files needed for the examples to run.we can add this as one of the subtasks for the #13929.
natinew77-creator commentedon Jul 19, 2026
Thanks @teonbrooks! Will do, I'll track it under #13929 and start on the lite_data fetcher, using the file list I already scoped out in #13925.
teonbrooks commentedon Jul 21, 2026
@larsoner or @drammock, for the Jupyterlite support, we would like to host a subset of the sample dataset. we were planning to use the original files and just point to those but @natinew77-creator pointed out to me that they're all currently zipped on OSF.
I suspect this means we would need to re-host a small version. how should we go about hosting this? within the same project?
larsoner commentedon Jul 21, 2026
It's trivial for me to upload a new
.tar.gzto the MNE org on OSF. Just upload what you want to DropBox or somewhere else, I'll download it, and then add it to osf.io. If we end up needing to iterate more I could give you access as well @teonbrooksnatinew77-creator commentedon Jul 21, 2026
Thanks @larsoner! packaged it up, MNE-lite-data.tar.gz, 36 files (curated subset of sample + kiloword/erp_core/mtrf/eegbci) in canonical layout. here's the link:
https://drive.google.com/file/d/1VjhWfNFBBn8S5y-7QqxywtaskDpLUgX5/view?usp=sharing
and yeah access to iterate later would be great, thanks!
larsoner commentedon Jul 21, 2026
Okay uploaded to:
https://osf.io/rxvq7/files/a8qbx
natinew77-creator commentedon Jul 21, 2026
Thanks!
natinew77-creator commentedon Aug 2, 2026
Implemented in #13925, so closing this.
mne.datasets.lite_data follows the standard dataset pattern and is registered in mne/datasets/config.py. Thanks @larsoner for hosting the archive https://osf.io/rxvq7/files/a8qbx. It extracts to MNE-lite-data/ with files under their original dataset folders, so paths match the full datasets.
One refinement worth noting: the build resolves each file from the real dataset first and falls back to the curated archive. The archive only holds what it was published with, so files added to the build afterwards were silently going missing. This way new files resolve straight away, and the archive still covers builds without the full datasets, which keeps the original goal of not downloading several GB.
If the archive is refreshed to cover everything the build needs, that fallback can go and the curated set becomes the single source again.