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

BIDS App preparation and serial/parallel behavior #21

Merged
merged 42 commits into from
Apr 25, 2023

Conversation

ericearl
Copy link
Member

I started to move away from the "BIDS-App-like" behavior and started moving toward "BIDS-App" behavior like this:

https://github.com/bids-apps/example/blob/master/run.py

This involved changing the CLI. I also updated the serial and parallel behavior to rely on a --n-cpus or -n argument provided an integer. I also recognize the README still needs an overhaul here, but the functionality is solid and tested in all four cases of:

  1. Local serial run on subjects without sessions
  2. Local serial run on subjects with sessions
  3. Local parallel run on subjects without sessions
  4. Local parallel run on subjects with sessions

All "Local" runs were performed on curium. I'm happy to talk about this at your convenience.

Full disclosure, I have not tested the latest changes to the VisualQC prep'ed files. But I can quickly now if you'd prefer.

@ericearl ericearl requested a review from Arshitha April 15, 2023 11:51
@ericearl ericearl self-assigned this Apr 15, 2023
@Arshitha
Copy link
Collaborator

Thanks for the PR @ericearl ! I'll test out the branch sometime mid-next week and add comments here. I'm working on a few issues on integrate-into-bids-tree branch, and I don't want to make new changes until I've resolved functional issues pertaining to running the pipeline on HPC and visualizing on TurboVNC.

@ericearl
Copy link
Member Author

@Arshitha You're welcome! If you want to point me to data that I didn't curate I can continue testing and iterate through usage and non-usage of flags, etc. I've been testing on curium with the C11 data and it's really easy to launch concurrently (I'm re-running tests since my last tests were before the merge). Let me know if you want another set of eyes or hands on the HPC and viz issues on TurboVNC.

@Arshitha Arshitha requested a review from dmoracze April 19, 2023 19:38
ericearl and others added 10 commits April 19, 2023 23:21
- Update shutil.move() to use absolute paths
- Update the afni refacer cmd to use only one core, OMP_NUM_THREADS=1
Trying the pathlib Path.rename() function
Finally fixed the little shutil.move command
First attempt ayt parllelizing the renders with a -n argument
Broke a variable name during the last merge, fixed here
Hefty bunch of mini-edits to the README for this branch.
src/dsst_defacing_wf.py Outdated Show resolved Hide resolved
Comment on lines +194 to +195
subj_id = os.path.basename(subj_input_dir)
sess_id = os.path.basename(sess_dir) if sess_dir else None
Copy link
Collaborator

Choose a reason for hiding this comment

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

This is a minor comment/question. Is there a reason you're using os.path.basename() instead of the pathlib function which does the same thing?

Copy link
Member Author

Choose a reason for hiding this comment

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

I forgot the correct command and didn't want to look it up, so I used what I knew, which you're right does the same job. Also, if I remember right the subj_input_dir and sess_dir variables are strings coming into those arguments and not Path objects.

src/dsst_defacing_wf.py Outdated Show resolved Hide resolved
src/dsst_defacing_wf.py Outdated Show resolved Hide resolved
src/dsst_defacing_wf.py Outdated Show resolved Hide resolved
ericearl and others added 3 commits April 25, 2023 12:38
Wonderful additions!

Co-authored-by: Arshitha Basavaraj <[email protected]>
Accepting per suggestion.

Co-authored-by: Arshitha Basavaraj <[email protected]>
Accepting more per previous suggestion.

Co-authored-by: Arshitha Basavaraj <[email protected]>
src/dsst_defacing_wf.py Outdated Show resolved Hide resolved
src/dsst_defacing_wf.py Outdated Show resolved Hide resolved
src/dsst_defacing_wf.py Outdated Show resolved Hide resolved
src/dsst_defacing_wf.py Outdated Show resolved Hide resolved
src/dsst_defacing_wf.py Outdated Show resolved Hide resolved
src/dsst_defacing_wf.py Outdated Show resolved Hide resolved
- change participant_label and session_id to default to None
- add accompanying flow control logic for using None as the default
@Arshitha Arshitha merged commit a0575ba into integrate-into-bids-tree Apr 25, 2023
@Arshitha
Copy link
Collaborator

@ericearl Thank you for you patience while I tested and reviewed this! PR has been to integrate-into-bids-tree branch but I'll merge it to main now.

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