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

Make extracting sidecar metadata optional #33

Merged
merged 2 commits into from
May 1, 2024
Merged

Conversation

clane9
Copy link
Collaborator

@clane9 clane9 commented May 1, 2024

In datasets with large sidecar json metadata, extracting metadata can take up >90% of run time. Add an option to ignore metadata when it's not needed to get a significant speedup. The 'meta__json' column remains in the table but the values are null.

In datasets with large sidecar json metadata, extracting metadata can
take up >90% of run time.
@effigies
Copy link
Contributor

effigies commented May 1, 2024

Would it be possible to load the metadata afterwards? Consider the case where you need metadata, but only on a few files. You could filter the table first, and then load.

@clane9
Copy link
Collaborator Author

clane9 commented May 1, 2024

Hey @effigies, thanks for the comment, that is a good point. It's definitely pretty easy to do after the fact by applying extract_metadata to the file paths in the filtered table. I just added a helper method in BIDSTable that does this.

@clane9 clane9 merged commit b22f036 into main May 1, 2024
3 checks passed
@clane9 clane9 deleted the feat/skip-sidecar branch May 1, 2024 20:14
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.

2 participants