docs: correct pip extras in installation guide to match setup.cfg#8999
docs: correct pip extras in installation guide to match setup.cfg#8999ymxlx wants to merge 1 commit into
Conversation
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>
📝 WalkthroughWalkthroughUpdated the installation documentation’s all-optional-dependencies list. The documented extras now include Estimated code review effort: 1 (Trivial) | ~2 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
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
📒 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. |
There was a problem hiding this comment.
🎯 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.
| `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
Description
The extras list in the installation guide (
docs/source/installation.md) has drifted from the actual[options.extras_require]section ofsetup.cfg:onnxruntimeis documented as an extra, but no such extra exists.onnxruntimeis a dependency installed by theonnxextra. 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.torchio,packaging,polygraphy, andpyamg.transformersonward).This PR updates only the documentation so the bracket list and the corresponding package list match
setup.cfgexactly (42 extras, one prose entry per extra, same order), and notes that theonnxextra also installsonnxruntime. Verified programmatically: 0 missing, 0 extra, 0 nonexistent after the edit. No changes tosetup.cfg.Types of changes
DCO: commit is signed off (
Signed-off-by: ymxlx).🤖 Generated with Claude Code