Repository navigation
Fix broken fully_shard reference in FullyShardedModule docstring - #4007
Merged
Merged
Conversation
zcbenz
approved these changes
Aug 6, 2026
1 task done
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.
Proposed changes
FullyShardedModule's docstring says "Use :func:fully_shardto wrap a module", but that link is dead:The two are documented under different module contexts in
nn/distributed.rst.fully_shardsits under.. currentmodule:: mlx.nn.layers.distributed, whileFullyShardedModuleis under.. currentmodule:: mlx.nn, so on that page the bare name resolves againstmlx.nnand finds nothing.Qualified it, using the
~form that the same file already uses for:func:~mlx.core.quantize``, so the rendered text staysfully_shard. After the change the reference resolves.One thing worth flagging: I noticed the commit that added this landed as "[WIP] [CUDA] fsdp" (#3768). I still thought this was worth sending because both
fully_shardandFullyShardedModuleare already listed innn/distributed.rst, so this only repairs a link between two pages you have already made public rather than exposing anything new. If you would rather leave the fsdp docs untouched until that work settles, please just close this, no problem at all.Checklist
Put an
xin the boxes that apply.pre-commit run --all-filesto format my code / installed pre-commit prior to committing changes(one line, docstring text only; verified by building the docs before and after)
context on me: freshman contributor, i use Claude Code to help sweep for this kind of thing. you closed my
gather_qqmmdocs PR earlier today because that API is still in progress, which was a fair call and taught me to check whether something is meant to be public before touching it. that is why i checked here that both names are already in the docs, and why i am flagging the WIP origin rather than quietly shipping it.