neuralbench.data.get_default_dataloaders

neuralbench.data.get_default_dataloaders(device: str, task: str, *, dataset: str | None = None, **overrides: Any) dict[str, DataLoader][source][source]

Return the train/val/test DataLoaders for a task’s default data config.

The dataloaders match those of a non-debug benchmark run for the same task, except for model-specific preprocessing: model configs override data.neuro (sampling frequency, filters, clamping) and, for some models, data.channel_positions, and those overrides are not applied here.

Parameters:
  • device – Brain recording device ("eeg", "meg", "fmri", …).

  • task – Single task name, e.g. "motor_imagery".

  • dataset – Dataset variant from the task’s datasets/ directory. None uses the study of the task config.

  • **overrides – Overrides for the data config, as dotted paths, e.g. batch_size=8 or **{"neuro.frequency": 60.0}.

Returns:

  • dict with keys "train", "val", "test" mapping to

  • DataLoader instances.

Examples

Extraction inherits the benchmark infra, which submits SLURM jobs where a cluster is available. To extract in-process instead:

>>> loaders = get_default_dataloaders(
...     "eeg", "audiovisual_stimulus", **{"neuro.infra.cluster": None}
... )