Skip to content

Ensure enough sub-processes for itk-infer#85

Merged
MGAMZ merged 1 commit into
mainfrom
dev/itk-infer-args
Mar 26, 2026
Merged

Ensure enough sub-processes for itk-infer#85
MGAMZ merged 1 commit into
mainfrom
dev/itk-infer-args

Conversation

@MGAMZ
Copy link
Copy Markdown
Owner

@MGAMZ MGAMZ commented Mar 26, 2026

itk-infer now will take max(args.num_proc, args.gpus) as the actual value of --num-proc, so users are allowed to only specify --gpus if they want to inference with multi-gpus.

Copilot AI review requested due to automatic review settings March 26, 2026 12:49
@MGAMZ MGAMZ added enhancement New feature or request process itkit.process module labels Mar 26, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Updates itk-infer CLI argument handling to ensure the spawned subprocess count is sufficient for the requested number of GPUs, enabling multi-GPU inference by specifying --gpus alone.

Changes:

  • Clarified CLI help text for --num-proc and --gpus to reflect GPU round-robin assignment and the effective process count behavior.
  • Added validation to reject non-positive values for --num-proc and --gpus.
  • Automatically sets args.num_proc = max(args.num_proc, args.gpus) after parsing/validation.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 26, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (main@af652fa). Learn more about missing BASE report.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #85   +/-   ##
=======================================
  Coverage        ?   72.19%           
=======================================
  Files           ?      108           
  Lines           ?    12244           
  Branches        ?     1099           
=======================================
  Hits            ?     8839           
  Misses          ?     3147           
  Partials        ?      258           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@MGAMZ MGAMZ merged commit a0fca07 into main Mar 26, 2026
14 checks passed
@MGAMZ MGAMZ deleted the dev/itk-infer-args branch March 26, 2026 12:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request process itkit.process module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants