-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Add input validation to ImageStats class #8501
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
base: dev
Are you sure you want to change the base?
Conversation
….github.com> I, Emdya Permuy <[email protected]>, hereby add my Signed-off-by to this commit: 5c3cba9 Signed-off-by: Emdya Permuy <[email protected]>
….github.com> I, Emdya Permuy <[email protected]>, hereby add my Signed-off-by to this commit: 06c41a8 Signed-off-by: Emdya Permuy <[email protected]>
Co-authored-by: Eric Kerfoot <[email protected]> Signed-off-by: YunLiu <[email protected]>
Co-authored-by: Eric Kerfoot <[email protected]> Signed-off-by: YunLiu <[email protected]>
WalkthroughInput validation was added to the Changes
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
🧰 Additional context used🧬 Code Graph Analysis (1)monai/auto3dseg/analyzer.py (1)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (17)
🔇 Additional comments (1)
✨ Finishing Touches
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
/build |
Fixes # .
Description
This pull request adds input validation to the ImageStats class in monai/auto3dseg/analyzer.py.
Specifically, it introduces type and value checks at the start of the call method to ensure: The input is a dictionary. The specified image_key exists in the input data. The value for image_key is a NumPy array, torch.Tensor, or MetaTensor. The image array has at least 3 dimensions. If any of these checks fail, an informative error is raised.This enhancement improves robustness and user experience by providing clearer feedback when invalid data is passed to the analyzer.
Types of changes
./runtests.sh -f -u --net --coverage
../runtests.sh --quick --unittests --disttests
.make html
command in thedocs/
folder.Summary by CodeRabbit