Skip to content

add no_pytorch matrix option in dependencies.yaml#421

Merged
rapids-bot[bot] merged 1 commit intorapidsai:mainfrom
trxcllnt:fix/dependencies-without-pytorch
Mar 6, 2026
Merged

add no_pytorch matrix option in dependencies.yaml#421
rapids-bot[bot] merged 1 commit intorapidsai:mainfrom
trxcllnt:fix/dependencies-without-pytorch

Conversation

@trxcllnt
Copy link
Copy Markdown
Contributor

@trxcllnt trxcllnt commented Mar 5, 2026

This option allows generating dependencies without pytorch (or dependencies that pull in pytorch) in the dependencies list, which is something we have to do for NVAIE/DLFW builds.

@trxcllnt trxcllnt requested a review from a team as a code owner March 5, 2026 23:54
@trxcllnt trxcllnt requested a review from jameslamb March 5, 2026 23:54
@trxcllnt trxcllnt added improvement Improves an existing functionality non-breaking Introduces a non-breaking change labels Mar 5, 2026
@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps bot commented Mar 5, 2026

Greptile Summary

Adds a no_pytorch: "true" matrix option to dependencies.yaml that suppresses PyTorch and PyTorch-dependent packages (torch, torch-geometric, ogb, sentence-transformers) from requirements/pyproject outputs, enabling NVAIE/DLFW builds that must not pull in PyTorch.

  • depends_on_pytorch, depends_on_pyg, depends_on_ogb, and depends_on_sentence_transformers each gain a no_pytorch: "true" guard as the first specific matrix entry, returning empty packages for requirements/pyproject output types.
  • Conda outputs are intentionally unaffected by the new flag.
  • py_test_cugraph_pyg file section references the individual dependency groups directly.
  • No logic issues found; the pattern is consistent with the existing require_gpu and cuda_suffixed matrix guards throughout the file.

Confidence Score: 5/5

  • Safe to merge — config-only change with no runtime code impact.
  • Single YAML file changed with no functional logic issues. The no_pytorch: "true" guards follow established matrix matching patterns (require_gpu, cuda_suffixed) used elsewhere in the file. Empty-packages guard is correctly placed first in each matrix list so it wins on match. Conda outputs remain unaffected as intended.
  • No files require special attention.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[dependency-file-generator invoked] --> B{no_pytorch=true?}
    B -- Yes --> C[requirements/pyproject outputs]
    C --> D[depends_on_pytorch → empty]
    C --> E[depends_on_pyg → empty]
    C --> F[depends_on_ogb → empty]
    C --> G[depends_on_sentence_transformers → empty]
    B -- No --> H[Normal matrix matching]
    H --> I[depends_on_pytorch → torch + index-url]
    H --> J[depends_on_pyg → torch-geometric]
    H --> K[depends_on_ogb → ogb]
    H --> L[depends_on_sentence_transformers → sentence-transformers]
    B -- conda output --> M[conda outputs unaffected by no_pytorch]
    M --> N[pytorch_geometric, ogb, sentence-transformers still included]
Loading

Last reviewed commit: 0fcf344

@jameslamb
Copy link
Copy Markdown
Member

/merge

@rapids-bot rapids-bot bot merged commit ea84449 into rapidsai:main Mar 6, 2026
67 checks passed
@trxcllnt trxcllnt deleted the fix/dependencies-without-pytorch branch March 6, 2026 17:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

improvement Improves an existing functionality non-breaking Introduces a non-breaking change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants