Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

avoid creating many Annotations objects in for loop #1079

Merged
merged 3 commits into from
Oct 10, 2022

Conversation

agramfort
Copy link
Member

without this fix read_raw_bids on a subject from https://openneuro.org/datasets/ds003825 takes 600s on my laptop. With this fix it's < 3s.

@codecov
Copy link

codecov bot commented Oct 9, 2022

Codecov Report

Merging #1079 (23a3a9d) into main (79aeaa4) will not change coverage.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##             main    #1079   +/-   ##
=======================================
  Coverage   95.19%   95.19%           
=======================================
  Files          24       24           
  Lines        3847     3847           
=======================================
  Hits         3662     3662           
  Misses        185      185           
Impacted Files Coverage Δ
mne_bids/read.py 95.95% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@hoechenberger
Copy link
Member

@agramfort Care to add a short changelog entry?
Otherwise LGTM

Copy link
Member

@sappelhoff sappelhoff left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice

@hoechenberger hoechenberger merged commit b522269 into mne-tools:main Oct 10, 2022
@hoechenberger
Copy link
Member

Thanks @agramfort!

sappelhoff pushed a commit to sappelhoff/mne-bids that referenced this pull request Oct 21, 2022
sappelhoff added a commit that referenced this pull request Oct 21, 2022
* avoid creating many Annotations objects in for loop (#1079)

* ENH: Better error message (#1080)

* ENH: Better error message

* FIX: Beautiful infrastructure

* FIX: Spacing

* ENH: Improve error message (#1081)

* ENH: Improve error message

* FIX: Use working openneuro-py

* FIX: Install

* FIX: Name

* ENH: Make suggestion (#1087)

* MRG: Enforce specification of all annotation descriptions in event_id if event_id is passed to write_raw_bids() (#1086)

* Write all annotations even if event_id was passed

* Implement new logic

* Update changelog

* Fix tests

* Style

* REL: v0.11.1

Co-authored-by: Alexandre Gramfort <[email protected]>
Co-authored-by: Eric Larson <[email protected]>
Co-authored-by: Richard Höchenberger <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants