WholeSessionSpikeDataset#

class core.dataset.WholeSessionSpikeDataset(root, regime, unit_qc=None, dirname='ibl_brain_wide_bench_2026', recording_ids=None, transform=None, contract=None, **kwargs)[source]#

Bases: core.dataset.IBLBrainWideBench2026

The benchmark sampled over whole sessions, after neural QC.

Unit-level pretraining and TS3 both come through here, so the units a model trains on cannot drift from the units a suite scores.

Parameters:
  • root (str) – The root directory of the dataset.

  • regime (Literal['pretrain', 'eval']) – The regime of the dataset (pretrain, eval).

  • dirname (str) – The name of the dataset (and the directory containing its data).

  • recording_ids (Union[str, list[str], None]) – Recordings to keep, a subset of the regime’s list. None keeps all.

  • transform (Optional[Callable]) – The transform(s) to apply to the data.

  • unit_qc (Optional[UnitQCPolicy]) – Which sessions and units to keep. Defaults to the raw population; every consumer declares its own beside the dataset that uses it.

  • contract (Optional[str]) – Name used in the contract error, defaults to the class name.

get_sampling_intervals()[source]#

The whole spike domain of each recording, keyed by recording id.

A whole-session model reads a unit’s entire train, so nothing is trimmed here.

Return type:

dict[str, Interval]

dataset_transform(data)[source]#

Defines dataset-level transformations that are applied to all recordings in the Dataset.

This method can be applied on an entire recording or a single slice.

Parameters:

data (Data) – The Data object to apply the transformations to.

Return type:

Data

Returns:

The Data object with the transformations applied.

Example

>>> dataset = IBLBrainWideBench2026(...)
>>> data = dataset.get_recording(...)
>>> data = dataset.dataset_transform(data)
>>> slice = data.slice(0.5, 1.5)
>>> slice = dataset.dataset_transform(slice)