Skip to content

Conversation

@tien-tong
Copy link
Contributor

@tien-tong tien-tong commented Oct 29, 2025

Closes #478.

Changes proposed in this pull request

  • Add parallel processing to cubids add-nifti-info via --n-cpus (defaults to 1).
    • Factor out single-file metadata write into _add_metadata_single_nifti.
  • Show a progress bar while add-nifti-info to each json file.
  • Allow parallel DataLad saves by adding jobs to CuBIDS.datalad_save(...).
  • Add --n-cpus through CLI parsers for:
    • add-nifti-info
    • add-file-collections
    • purge
    • datalad-save

Documentation that should be reviewed

  • docs/example.rst: New note and example usage of --n-cpus for cubids add-nifti-info.

@cursor
Copy link

cursor bot commented Oct 29, 2025

You have run out of free Bugbot PR reviews for this billing cycle. This will reset on November 20.

To receive reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.

@tien-tong tien-tong requested a review from mattcieslak October 30, 2025 14:35
Copy link
Contributor

@mattcieslak mattcieslak left a comment

Choose a reason for hiding this comment

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

This is probably all good, but we should be sure that if no cpus are requested that it defaults to 1 instead of None. I'm worried None will try to use all the cpus, but I'm not sure that's what actually happens

@tien-tong tien-tong requested a review from mattcieslak October 30, 2025 15:01
Copy link
Contributor

@mattcieslak mattcieslak left a comment

Choose a reason for hiding this comment

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

thanks!!

@tien-tong tien-tong merged commit 814e9b8 into main Oct 30, 2025
10 checks passed
@tien-tong tien-tong deleted the add-nifti-info-parallel branch October 30, 2025 15:15
@tien-tong tien-tong added the enhancement New feature or request label Nov 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Parallelize cubids add-nifti-info

3 participants