Skip to content

Document ThreadLocalStream and iinfo in the API reference - #3986

Merged
zcbenz merged 1 commit into
ml-explore:mainfrom
ayaangazali:docs-add-missing-public-classes
Aug 5, 2026
Merged

Document ThreadLocalStream and iinfo in the API reference#3986
zcbenz merged 1 commit into
ml-explore:mainfrom
ayaangazali:docs-add-missing-public-classes

Conversation

@ayaangazali

Copy link
Copy Markdown
Contributor

Proposed changes

Two public classes are missing from the API reference while their direct counterparts are already listed.

ThreadLocalStream is what new_thread_local_stream returns, and it shows up in the type stubs as an accepted stream argument in essentially every op:

stream: mlx.core.Stream | mlx.core.ThreadLocalStream | mlx.core.Device | None = None

Stream and Device are both on the devices and streams page, so one of the three types a user can pass has no page to click through to. Building the docs with -n reports target not found: mlx.core.ThreadLocalStream 65 times, which is what led me here.

iinfo is the integer counterpart of finfo and works the same way, but only finfo is listed on the data types page:

mx.finfo(mx.float32)   # finfo(min=-3.40282e+38, max=3.40282e+38, dtype=float32)
mx.iinfo(mx.int32)     # iinfo(min=-2147483648, max=2147483647, dtype=int32)

Both entries generate their stub pages cleanly and the build adds no new warnings.

I left a few other unlisted names alone since omitting them looks deliberate rather than accidental: ArrayAt, ArrayIterator, ArrayLike, DeviceType, StreamContext and FunctionExporter are mostly internal or helper types. Glad to add any of them if you would rather they were listed.

Checklist

Put an x in the boxes that apply.

  • I have read the CONTRIBUTING document
  • I have run pre-commit run --all-files to format my code / installed pre-commit prior to committing changes
  • I have added tests that prove my fix is effective or that my feature works
  • I have updated the necessary documentation (if needed)

(docs only; built the docs before and after and checked the generated stubs)


being upfront as usual: freshman here and Claude Code helps me sweep, but i found these by building the docs in nitpick mode and reading the unresolved references, then checked each class actually exists and runs before adding it. the list of ones i deliberately skipped is a real question, not filler.

@zcbenz
zcbenz force-pushed the docs-add-missing-public-classes branch from 85aaaf0 to f8c1074 Compare August 4, 2026 23:24
@zcbenz
zcbenz merged commit a681f8b into ml-explore:main Aug 5, 2026
28 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.

2 participants