Skip to content

Lazier data loading and static dataset analysis #1092

Open

Description

@PierreGtch

Amazing, the loop will soon be complete!

With nemar, we can now get really lazy! For example, we can allow the user to download only a specific session, or even a specific run.
We can also have a function to get the exact structure of the dataset (number of subjects, sessions, runs, trials, etc) without downloading the data.
Wdyt @bruAristimunha ?
Maybe best to keep this for a follow-up pr

Originally posted by @PierreGtch in #1084

Activity

  1. davisethan commented on Jul 18, 2026

    @davisethan
    Contributor

    Hi @PierreGtch, I recently downloaded many LeftRightImagery datasets with the latest develop branch giving me NEMAR BIDS:

    classes = [BNCI2014_001, BNCI2014_004, ...]
    for cls in classes:
        ds = cls()
        ds.download(accept=True)

    Then, in a separate process, I built evaluations/pipelines:

    ...
    X, _, _ = paradigm.get_data(
        dataset,
        subjects=dataset.subject_list[:1],
        cache_config=dict(use=True, save_array=True, overwrite_array=False),
    )
    ...

    I found that paradigm.get_data() isn't wired to find NEMAR downloads:

    paradigm.get_data() →
    dataset.get_data() →
    _get_selected_subject_data() →
    _get_single_subject_data_using_cache() →
    _get_single_subject_data() # Builds upstream URL
    

    In many cases the dataset is silently, redundantly redownloaded. You opened this issue last month. I'm curious what headway you've made and if help is still wanted. A _get_single_subject_data_from_nemar() function in BaseDataset already exists. But it isn't being used in at least LeftRightImagery dataset classes.

  2. I-am-Uchenna commented on Jul 23, 2026

    @I-am-Uchenna

    Update after reproducing the routing gap: a general get_data switch is not safe as a narrow patch. NEMAR and legacy loaders can currently produce different session/task selections and sample counts for some deposits, so automatic local-source detection would make results depend on what happens to be cached. I'm stepping back from this slice rather than proposing a non-deterministic source change; the source-selection and cache-key contract needs maintainer alignment first.

  3. bruAristimunha commented on Jul 25, 2026

    @bruAristimunha
    Collaborator

    This is an interesting report @I-am-Uchenna, @davisethan. Many thanks for reporting. I will disable the nemar downloading until we are sure of the perfect alignment. If you can point out the discrepancy, please let me know.

  4. davisethan commented on Jul 28, 2026

    @davisethan
    Contributor

    This summarizes my findings: nemar-report.md

  5. bruAristimunha commented on Aug 26, 2026

    @bruAristimunha
    Collaborator

    hey @I-am-Uchenna and @davisethan,

    Now, it should be fine, and there is no difference anymore between all the details. We re-host the raw and not bids version too at nemar inside the sourcedata folder. Took me a lot of time because we have too many datasets.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions