Add empty cpu/gpu/training extras_require slots (Phase 4) - #1196
Closed
Shi-Dong wants to merge 1 commit into
Closed
Conversation
Contributor
There was a problem hiding this comment.
Code Review
This pull request adds placeholder extra requirements (cpu, gpu, and training) to setup.py as part of the roadmap for pip install miles. These placeholders are currently empty and will be populated in future phases. There are no review comments, and I have no feedback to provide.
This was referenced May 26, 2026
Shi-Dong
marked this pull request as ready for review
May 28, 2026 06:50
Shi-Dong
force-pushed
the
shi/pin-megatron-bridge-sha
branch
from
May 30, 2026 08:17
c614953 to
2d6ece2
Compare
Shi-Dong
force-pushed
the
shi/phase4-extras-require-inventory
branch
2 times, most recently
from
June 1, 2026 16:12
a458463 to
ef8c861
Compare
Shi-Dong
force-pushed
the
shi/pin-megatron-bridge-sha
branch
from
June 1, 2026 16:12
2d6ece2 to
9cbd212
Compare
Shi-Dong
force-pushed
the
shi/phase4-extras-require-inventory
branch
from
June 2, 2026 04:40
ef8c861 to
51fee7e
Compare
Shi-Dong
force-pushed
the
shi/pin-megatron-bridge-sha
branch
2 times, most recently
from
June 2, 2026 09:07
cca1c14 to
4f82d4b
Compare
Shi-Dong
force-pushed
the
shi/phase4-extras-require-inventory
branch
from
June 2, 2026 09:07
51fee7e to
518d340
Compare
Shi-Dong
force-pushed
the
shi/pin-megatron-bridge-sha
branch
from
June 3, 2026 15:02
4f82d4b to
d190a0b
Compare
Shi-Dong
force-pushed
the
shi/phase4-extras-require-inventory
branch
from
June 3, 2026 15:02
518d340 to
6ee0b3f
Compare
Phase 4 of the `pip install miles` roadmap: declare the structure of the extras_require taxonomy without populating it yet. Phase 6 will fill the gpu/training slots with the heavy GPU stack (flash-attn, transformer-engine, apex, mamba, etc.) that today lives in docker/Dockerfile. The slots are documented inline so future contributors know what belongs where. No runtime change — `pip install miles[cpu]` is a no-op against the empty list, but the syntax is now valid (won't KeyError on a typo) and the PR description includes the full audit of Dockerfile + requirements.txt that informed the categorization. Pre-existing extras (`fsdp`, `mlflow`) are left untouched.
Shi-Dong
force-pushed
the
shi/phase4-extras-require-inventory
branch
from
June 4, 2026 13:10
6ee0b3f to
db6b4d4
Compare
Contributor
Author
|
Closing as obsolete. This PR is superseded by a thin packaging slice cut fresh off current `main`:
Why this one is no longer needed: see the per-PR note below. The branch is left in place; nothing is lost. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
setup.py'sextras_require:cpu,gpu,training. Each one is documented inline so the intent is obvious to future contributors.Why
The
pip install milesroadmap (Phase 4) calls for declaring the extras_require taxonomy now so:pip install miles[gpu]and not get a KeyError on the typo — they just get the install_requires baseline (same as no extras), and the dependency list grows transparently as Phases 5–6 land.Phase 4 audit: where each current install lands
Already in
install_requires(fromrequirements.txt)20 packages — these are the always-installed dependencies of miles. All install cleanly from PyPI without a CUDA toolchain.
acceleratetorchtransitively (key for the eventual CPU path).blobfile,datasets,httpx[http2],mcp[cli],memray,omegaconf,pillow,pybase64,pylatexenc,pytest-asyncio,pyyaml,qwen_vl_utils,tensorboard,transformers,wandbray[default]ring_flash_attn; platform_system == "Linux"sglang-router>=0.2.3radixark/sgl-router-for-milespre-built wheel in the image, also published to PyPI.torchft-nightly==2026.4.3; platform_system == "Linux"extras_require["gpu"]— heavy GPU stack (Phase 6 target)Today installed by
docker/Dockerfile, not setup.py. Each needs CUDA toolchain at install time, a matching torch version, or a pre-built wheel.flash-attnyueming-yuan/miles-wheelsrelease. Build-from-source is multi-hour.flash-attn-3 (hopper)flash_attn_interface.pyfrom Dao-AILab/flash-attention raw.flash-linear-attention==0.4.2tilelanghttps://tile-ai.github.io/whl/nightly/cu128/.causal-conv1d==1.6.1mamba-ssm==2.3.1transformer_engine[pytorch]==2.10.0/transformer_engine==2.12.0 + transformer_engine_cu13apexnvidia-modelopt[torch]>=0.37.0torch_memory_saver(fzyzcjy/torch_memory_saver@ pinned SHA)mbridge(ISEEKYAN/mbridge@ pinned SHA)nvidia-cudnn-cu12==9.16.0.29orcu13numpy<2install_requiresonce we figure out the proper version constraint.extras_require["training"]— full training stack (Phase 5 + 6 target)Everything in
gpuplus the patched forks. These don't exist on PyPI yet; Phase 5 publishes them to a private index.radixark-sglang(fromthird_party/sglang)radixark-megatron(fromthird_party/Megatron-LM)radixark-megatron-bridge(Phase 3-pinned SHA)pip install git+...@<sha>in Dockerfile; Phase 6 may switch to a published wheel for symmetry.Docker-only / vendor-built / system-level (not exposed via pip)
apt install nvtop rsync dnsutils ethtoolnccl-tests(built from NVIDIA/nccl-tests source)/usr/local/bin/.int4_qat(fake_int4_quant_cudawheel)sgl-model-gatewaybinary/usr/local/bin/.sglang_routerwheelextras_require["cpu"]Currently empty. Likely stays empty or gets minor additions for things like docstring-rendering, pretty CLI, etc. that aren't worth bloating install_requires for. Will revisit in Phase 6 once we know what the CPU-only entry point needs.
Test plan
python3 -c 'import ast; ast.parse(open("setup.py").read())'— syntax OK.python:3.11container:pip install miles[cpu]— should succeed (against an empty list — equivalent topip install milesfor now).Stacked on
radixark/miles PR #1194 (Phase 3: pin Megatron-Bridge SHA). Once that merges, this PR's base auto-updates.
What's NOT in this PR
extras_requireentries with actual packages — that's Phase 6 (after the patched-fork wheels exist)..mdto the repo.