Skip to content

Conversation

@Borda
Copy link
Contributor

@Borda Borda commented Dec 30, 2025

This pull request simplifies the caching setup for pip dependencies in the GitHub Actions workflow and ensures that all pip installs use the PyTorch CPU wheel index. The main changes involve replacing custom cache steps with the built-in cache: 'pip' option in actions/setup-python, and adding the --extra-index-url flag to all relevant pip install commands for consistent dependency resolution.

Workflow caching improvements:

  • Replaced custom pip cache steps (using actions/cache and manual timestamp keys) with the built-in cache: 'pip' option in actions/setup-python, streamlining cache management across all jobs. [1] [2] [3] [4]

Dependency installation updates:

  • Updated all pip install commands to include --extra-index-url https://download.pytorch.org/whl/cpu, ensuring that PyTorch and related packages are consistently installed from the CPU wheel index. This affects installation from wheels, tarballs, requirements files, and direct package installs. [1] [2] [3] [4] [5]

Copilot AI review requested due to automatic review settings December 30, 2025 12:59
@Borda Borda requested a review from KumoLiu as a code owner December 30, 2025 12:59
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 30, 2025

📝 Walkthrough

Walkthrough

This pull request updates the GitHub Actions workflow configuration to consolidate pip caching using the built-in cache: 'pip' mechanism across multiple jobs and steps, replacing previous custom cache logic. It also adds --extra-index-url https://download.pytorch.org/whl/cpu to all pip install commands involving PyTorch-related packages (torch, torchvision, monai, and associated dependencies) to direct installation toward CPU-optimized wheel distributions.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Pre-merge checks

❌ Failed checks (1 inconclusive)
Check name Status Explanation Resolution
Title check ❓ Inconclusive Title is partially related but contains typos ('fro' instead of 'from') and is vague about the main changes, making it less clear than the actual implementation details. Revise to: 'Simplify CI caching and use PyTorch CPU wheels' or similar, correcting typos and improving clarity about the dual objectives.
✅ Passed checks (2 passed)
Check name Status Explanation
Description check ✅ Passed Description covers main changes with good detail and references, but doesn't follow the provided template structure with required sections like issue link, types of changes checklist, and test confirmations.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

📜 Recent review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Cache: Disabled due to data retention organization setting

Knowledge base: Disabled due to Reviews -> Disable Knowledge Base setting

📥 Commits

Reviewing files that changed from the base of the PR and between 15fd428 and dca59ee.

📒 Files selected for processing (1)
  • .github/workflows/pythonapp.yml
⏰ 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). (20)
  • GitHub Check: Agent
  • GitHub Check: flake8-py3 (pytype)
  • GitHub Check: flake8-py3 (mypy)
  • GitHub Check: flake8-py3 (codeformat)
  • GitHub Check: quick-py3 (macOS-latest)
  • GitHub Check: quick-py3 (ubuntu-latest)
  • GitHub Check: min-dep-py3 (3.10)
  • GitHub Check: build-docs
  • GitHub Check: quick-py3 (windows-latest)
  • GitHub Check: min-dep-os (windows-latest)
  • GitHub Check: packaging
  • GitHub Check: min-dep-pytorch (2.5.1)
  • GitHub Check: min-dep-py3 (3.11)
  • GitHub Check: min-dep-pytorch (2.8.0)
  • GitHub Check: min-dep-py3 (3.12)
  • GitHub Check: min-dep-pytorch (2.7.1)
  • GitHub Check: min-dep-py3 (3.9)
  • GitHub Check: min-dep-pytorch (2.6.0)
  • GitHub Check: min-dep-os (macOS-latest)
  • GitHub Check: min-dep-os (ubuntu-latest)
🔇 Additional comments (3)
.github/workflows/pythonapp.yml (3)

36-36: Built-in pip caching correctly applied.

This simplifies cache management as intended.


69-69: LGTM: Consistent pip caching across all jobs.

Built-in caching mechanism correctly applied.

Also applies to: 119-119, 190-190


127-127: CPU wheel index correctly applied.

All pip install commands properly configured to use CPU PyTorch wheels.

Also applies to: 156-156, 167-167, 177-177, 194-194


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 and usage tips.

Copy link

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

This PR optimizes CI workflow resource usage by simplifying pip caching and ensuring consistent use of PyTorch CPU-only wheels to resolve drive space issues.

  • Replaced custom cache management with built-in actions/setup-python caching
  • Added --extra-index-url https://download.pytorch.org/whl/cpu to pip install commands for smaller PyTorch installations

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

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
.github/workflows/pythonapp.yml (1)

86-86: Missing CPU wheel index flag.

Line 86 installs PyTorch without --extra-index-url https://download.pytorch.org/whl/cpu, causing CUDA wheels (~2GB+) to be downloaded instead of CPU wheels, defeating the PR's disk space reduction objective.

🔎 Proposed fix
-        python -m pip install torch==2.5.1 torchvision==0.20.1
+        python -m pip install torch==2.5.1 torchvision==0.20.1 --extra-index-url https://download.pytorch.org/whl/cpu
📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Cache: Disabled due to data retention organization setting

Knowledge base: Disabled due to Reviews -> Disable Knowledge Base setting

📥 Commits

Reviewing files that changed from the base of the PR and between 15fd428 and dca59ee.

📒 Files selected for processing (1)
  • .github/workflows/pythonapp.yml
⏰ 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). (20)
  • GitHub Check: Agent
  • GitHub Check: flake8-py3 (pytype)
  • GitHub Check: flake8-py3 (mypy)
  • GitHub Check: flake8-py3 (codeformat)
  • GitHub Check: quick-py3 (macOS-latest)
  • GitHub Check: quick-py3 (ubuntu-latest)
  • GitHub Check: min-dep-py3 (3.10)
  • GitHub Check: build-docs
  • GitHub Check: quick-py3 (windows-latest)
  • GitHub Check: min-dep-os (windows-latest)
  • GitHub Check: packaging
  • GitHub Check: min-dep-pytorch (2.5.1)
  • GitHub Check: min-dep-py3 (3.11)
  • GitHub Check: min-dep-pytorch (2.8.0)
  • GitHub Check: min-dep-py3 (3.12)
  • GitHub Check: min-dep-pytorch (2.7.1)
  • GitHub Check: min-dep-py3 (3.9)
  • GitHub Check: min-dep-pytorch (2.6.0)
  • GitHub Check: min-dep-os (macOS-latest)
  • GitHub Check: min-dep-os (ubuntu-latest)
🔇 Additional comments (3)
.github/workflows/pythonapp.yml (3)

36-36: Built-in pip caching correctly applied.

This simplifies cache management as intended.


69-69: LGTM: Consistent pip caching across all jobs.

Built-in caching mechanism correctly applied.

Also applies to: 119-119, 190-190


127-127: CPU wheel index correctly applied.

All pip install commands properly configured to use CPU PyTorch wheels.

Also applies to: 156-156, 167-167, 177-177, 194-194

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