Skip to content

feat(rl): expose GPU profiles to source consumers - #129

Merged
wlgys8 merged 1 commit into
mainfrom
feat/29-member-gpu-profiles
Oct 17, 2026
Merged

wlgys8 merged 1 commit into
mainfrom
feat/29-member-gpu-profiles

Conversation

@wlgys8

@wlgys8 wlgys8 commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Move CUDA/ROCm extras, version pins and extra-gated PyTorch index routing into the installable motrix-rl package.
  • Forward workspace GPU extras to motrix-rl while preserving install.sh entry points.
  • Per reviewer request, do not retain heavyweight resolver integration tests; source consumption, install plans and wheel metadata were checked as one-time acceptance.
  • Document external consumer conflicts and the distinction between source-based uv installation and wheel/PyPI installation.

Fixes #29

Validation

  • One-time GPU resolver/wheel acceptance — 11 checks passed before removing the temporary integration tests. Retained version tests: python3 -m pytest tests/test_workspace_versions.py -q
  • Verified resolver tests with uv 0.9.8 and CI version 0.9.14 before rebase
  • uv lock --check
  • prek run --all-files
  • git diff --check
  • Full training suite / actual GPU runtime testing (not run; dependency-only change)

Compatibility and limitations

  • Existing workspace install.sh --gpu cuda/rocm entry points remain unchanged.
  • Default installs continue resolving Torch from PyPI; GPU index routing is activated only by the corresponding extra.
  • External Git consumers exposing both optional profiles must declare root forwarding and package-qualified conflict pairs; selecting only one profile needs no extra conflict configuration.
  • Wheel metadata does not preserve uv index routing; pip and wheel consumers must configure the PyTorch index explicitly.
  • uv 0.9.8/0.9.14 export loses GPU selection through forwarding extras. Documented limitation: use uv sync; one-time acceptance inspected isolated sync --dry-run plans rather than exported requirements.
  • No GPU wheels installed and no existing runtime environment modified by validation.

Target branch

Targets upstream main; rebased onto the merged Python 3.11 support PR so this PR includes only issue #29 changes.

@wlgys8
wlgys8 force-pushed the feat/29-member-gpu-profiles branch from 3be809c to 1902e68 Compare October 17, 2026 15:48
@wlgys8
wlgys8 requested a balanced review from Copilot October 17, 2026 15:49

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔵 Needs a closer look

Correctness hinges on uv's workspace resolution semantics and a large auto-generated lockfile that cannot be fully validated in this environment (no uv/network), affecting installation for all GPU and external source consumers.

No open issues 🎉

What changed in this PR

This PR implements issue #29 by relocating the GPU wheel dependency profiles (CUDA/ROCm torch pins and PyTorch index routing) from the non-installable workspace root into the installable motrix_rl package. The goal is to let external projects that consume motrix_rl via a Git/source dependency inherit the pinned torch versions and extra-gated index routing automatically, instead of re-copying ~40 lines of configuration. The workspace root now forwards its cuda/rocm extras to motrix-rl[cuda]/motrix-rl[rocm], so repository-internal install.sh entry points are preserved.

Changes:

  • Move cuda/rocm extras, the pytorch-cu128/pytorch-rocm72 explicit indexes, extra-gated tool.uv.sources torch routing, and the cuda/rocm conflict into motrix_rl/pyproject.toml; root forwards via cuda = ["motrix-rl[cuda]==0.4.0b1"] / rocm = [...].
  • Add extra-gating to the torchvision/torchaudio/triton-rocm sources (previously ungated), tightening default-index resolution.
  • Document GPU install profiles and external-consumer conflict/source requirements in motrix_rl/README.md, and expand testing-layering guidance in AGENTS.md.
  • Regenerate uv.lock to reflect the new extra-9-motrix-rl-cuda/-rocm extras.
File Description
motrix_rl/​pyproject.toml Adds cuda/rocm optional-dependencies, pytorch indexes, extra-gated sources, and member-local conflict.
pyproject.toml Replaces root GPU extras/indexes/sources with thin forwarding extras to motrix-rl; keeps the mutually-exclusive conflict.
motrix_rl/​README.md Documents GPU profiles, source-vs-wheel install behavior, and external Git-consumer conflict declaration.
AGENTS.md Expands testing guidelines on long-term tests vs one-time acceptance and test layering.
uv.lock Auto-regenerated lock reflecting the new per-package extras and markers.

I verified: version pins are consistent at 0.4.0b1; tests/test_workspace_versions.py self-dependency/pin logic still passes with the forwarding extras; no stale pytorch-cu128/pytorch-rocm72 references remain elsewhere; install.sh --gpu cuda/rocm and CI uv sync --frozen --extra cuda paths continue to route through the root forwarding extras. I found no objective line-level defects in the hand-edited files.

Review effort: Balanced

@wlgys8
wlgys8 merged commit 49a34b0 into main Oct 17, 2026
9 checks passed
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.

feat: 将 cuda/rocm torch 档位下放到可安装的 workspace 成员包,避免 git 依赖消费方重复配置

2 participants