Skip to content

docs: correct pip extras in installation guide to match setup.cfg#8999

Open
ymxlx wants to merge 1 commit into
Project-MONAI:devfrom
ymxlx:docs-fix-installation-extras
Open

docs: correct pip extras in installation guide to match setup.cfg#8999
ymxlx wants to merge 1 commit into
Project-MONAI:devfrom
ymxlx:docs-fix-installation-extras

Conversation

@ymxlx

@ymxlx ymxlx commented Jul 17, 2026

Copy link
Copy Markdown

Description

The extras list in the installation guide (docs/source/installation.md) has drifted from the actual [options.extras_require] section of setup.cfg:

  1. onnxruntime is documented as an extra, but no such extra exists. onnxruntime is a dependency installed by the onnx extra. As a result, pip install 'monai[onnxruntime]' currently succeeds but silently installs nothing (pip only warns that the extra is unknown), which is misleading for users following the docs.
  2. Four real, functional extras are undocumented: torchio, packaging, polygraphy, and pyamg.
  3. The "which correspond to" package list was misaligned with the bracket list (40 vs 39 entries, out of step from transformers onward).

This PR updates only the documentation so the bracket list and the corresponding package list match setup.cfg exactly (42 extras, one prose entry per extra, same order), and notes that the onnx extra also installs onnxruntime. Verified programmatically: 0 missing, 0 extra, 0 nonexistent after the edit. No changes to setup.cfg.

Types of changes

  • Non-breaking change (documentation only)

DCO: commit is signed off (Signed-off-by: ymxlx).

🤖 Generated with Claude Code

The extras list in docs/source/installation.md had drifted from
[options.extras_require] in setup.cfg:

- removed the nonexistent `onnxruntime` extra (onnxruntime is a
  dependency installed by the `onnx` extra, not an extra itself;
  `pip install 'monai[onnxruntime]'` silently installs nothing)
- added four real extras missing from the docs: `torchio`,
  `packaging`, `polygraphy`, `pyamg`
- realigned the "which correspond to" package list with the
  bracket list (one entry per extra, in the same order)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Signed-off-by: ymxlx <272607612+ymxlx@users.noreply.github.com>
@coderabbitai

coderabbitai Bot commented Jul 17, 2026

Copy link
Copy Markdown
Contributor
📝 Walkthrough

Walkthrough

Updated the installation documentation’s all-optional-dependencies list. The documented extras now include torchio, omit the explicit onnxruntime entry, and state that onnx installs onnxruntime. The dependency mapping prose was also revised for openslide-python and the hyena/nvsubquadratic relationship.

Estimated code review effort: 1 (Trivial) | ~2 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the documentation fix for pip extras matching setup.cfg.
Description check ✅ Passed The description is detailed and matches the template's main sections, with only the issue reference left unfilled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/source/installation.md`:
- Line 293: Update the dependency list in the installation documentation to
state that the `onnx` extra installs `onnxruntime` only for Python 3.10 and
earlier; clarify that Python 3.11 and newer users should not expect
`onnxruntime` to be installed automatically.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: a47c4904-c1db-4c06-bed6-4e586259d68b

📥 Commits

Reviewing files that changed from the base of the PR and between 3a458fe and 1a62872.

📒 Files selected for processing (1)
  • docs/source/installation.md

which correspond to `nibabel`, `scikit-image`,`scipy`, `pillow`, `tensorboard`,
`gdown`, `pytorch-ignite`, `torchvision`, `itk`, `tqdm`, `lmdb`, `psutil`, `cucim`, `openslide-python`, `pandas`, `einops`, `transformers`, `mlflow`, `clearml`, `matplotlib`, `tensorboardX`, `tifffile`, `imagecodecs`, `pyyaml`, `fire`, `jsonschema`, `ninja`, `pynrrd`, `pydicom`, `h5py`, `nni`, `optuna`, `onnx`, `onnxruntime`, `zarr`, `lpips`, `nvidia-ml-py`, `huggingface_hub`, `pyamg`, and `nvsubquadratic` respectively.
which correspond to `nibabel`, `scikit-image`, `scipy`, `pillow`, `tensorboard`,
`gdown`, `pytorch-ignite`, `torchio`, `torchvision`, `itk`, `tqdm`, `lmdb`, `psutil`, `cucim`, `openslide-python`, `pandas`, `einops`, `transformers`, `mlflow`, `clearml`, `matplotlib`, `tensorboardX`, `tifffile`, `imagecodecs`, `pyyaml`, `fire`, `packaging`, `jsonschema`, `ninja`, `pynrrd`, `pydicom`, `h5py`, `nni`, `optuna`, `onnx` (which also installs `onnxruntime`), `zarr`, `lpips`, `nvidia-ml-py`, `polygraphy`, `huggingface_hub`, `pyamg`, and `nvsubquadratic` respectively.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Document the Python-version condition for onnxruntime.

setup.cfg installs onnxruntime through the onnx extra only on Python 3.10 and earlier. This wording may mislead Python 3.11+ users into expecting it automatically.

-`onnx` (which also installs `onnxruntime`),
+`onnx` (which also installs `onnxruntime` on Python <= 3.10),

As per path instructions, documentation must be updated with the latest information.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
`gdown`, `pytorch-ignite`, `torchio`, `torchvision`, `itk`, `tqdm`, `lmdb`, `psutil`, `cucim`, `openslide-python`, `pandas`, `einops`, `transformers`, `mlflow`, `clearml`, `matplotlib`, `tensorboardX`, `tifffile`, `imagecodecs`, `pyyaml`, `fire`, `packaging`, `jsonschema`, `ninja`, `pynrrd`, `pydicom`, `h5py`, `nni`, `optuna`, `onnx` (which also installs `onnxruntime`), `zarr`, `lpips`, `nvidia-ml-py`, `polygraphy`, `huggingface_hub`, `pyamg`, and `nvsubquadratic` respectively.
`gdown`, `pytorch-ignite`, `torchio`, `torchvision`, `itk`, `tqdm`, `lmdb`, `psutil`, `cucim`, `openslide-python`, `pandas`, `einops`, `transformers`, `mlflow`, `clearml`, `matplotlib`, `tensorboardX`, `tifffile`, `imagecodecs`, `pyyaml`, `fire`, `packaging`, `jsonschema`, `ninja`, `pynrrd`, `pydicom`, `h5py`, `nni`, `optuna`, `onnx` (which also installs `onnxruntime` on Python <= 3.10), `zarr`, `lpips`, `nvidia-ml-py`, `polygraphy`, `huggingface_hub`, `pyamg`, and `nvsubquadratic` respectively.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/source/installation.md` at line 293, Update the dependency list in the
installation documentation to state that the `onnx` extra installs `onnxruntime`
only for Python 3.10 and earlier; clarify that Python 3.11 and newer users
should not expect `onnxruntime` to be installed automatically.

Source: Path instructions

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.

1 participant