-
Notifications
You must be signed in to change notification settings - Fork 145
Internal benchmarking/execution time for segmentation pipeline #777
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
Conversation
6fc7256 to
955f6fc
Compare
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR introduces infrastructure for measuring and logging execution time for the FastSurfer segmentation and surface pipelines, primarily via a new fs_time wrapper and a time_it helper, and wires this into run_fastsurfer.sh.
Changes:
- Extend
run_fastsurfer.shto define an execution-time log path (viaFASTSURFER_EXECTIMELOG), ensure its directory exists, and wrap major segmentation and surface commands with atime_ithelper so their runtimes are logged. - Add a new
time_itfunction and tighten error handling and batch-job management inrecon_surf/functions.sh, including more consistentPIPESTATUSchecks. - Replace the local
fs_timeimplementation with a more flexible version supporting additional flags (-a,--no-load,--debug) and improved formatting of timing output.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
run_fastsurfer.sh |
Wires in execution-time logging: documents FASTSURFER_EXECTIMELOG, sets a default exec_time_log path, ensures its directory exists, and wraps key segmentation and surface commands with time_it, while slightly reformatting command arrays and improving surface failure messaging. |
recon_surf/functions.sh |
Introduces time_it to run commands under fs_time into a timing file, adjusts RunIt/run_it/run_it_cmdf and RunBatchJobs for clearer status handling and logging, and keeps timecmd detection in sync with the new fs_time interface. |
recon_surf/fs_time |
Reworks the fs_time helper with a new option parser, configurable load-logging behavior, and improved output formatting, aligning it with the new timing pipeline while maintaining compatibility with existing usage in the recon-surf tools. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…ming information is written to a new scripts/timing.log file and contains both segmentation and surface pipeline timing information. run_fastsurfer.sh - add additional flag --timeit - add additional parameter --timeit_log <filename> which defaults to scripts/timing.log - add a wrapping command that will perform the timing (wraps command in fs_time call). - the default behavior does not change - some minor formatting recon_surf/functions.sh - implements the new TimeIt function, which is the wrapper that extracts the timing information. recon_surf/fs_time - update and cleanup
…fastsurfer.sh Configuration with FASTSURFER_EXECTIMELOG environment variable possible
955f6fc to
fedd39d
Compare
This PR adds a simple timing option of the segmentation pipeline that runs automatically.
This is tested in the docker image. The general intention would be to include execution time monitoring and improvements between libraries and python versions.
There are a couple of open questions to answer:
recon-surf.shalso switch over to logging execution times in a different file for clarity and standardization?