Skip to content

Added clarification to apply_fn parameter of apply_to_modules#2831

Merged
awni merged 3 commits intoml-explore:mainfrom
yuchaoran2011:patch-1
Nov 26, 2025
Merged

Added clarification to apply_fn parameter of apply_to_modules#2831
awni merged 3 commits intoml-explore:mainfrom
yuchaoran2011:patch-1

Conversation

@yuchaoran2011
Copy link
Copy Markdown
Contributor

Clarified the apply_fn argument in the docstring to include details about its parameters.

Proposed changes

When creating a transformer architecture using MLX and working on weight initialization, I had to read the source code of apply_to_modules to understand what apply_fn expects as its input parameters. Modified the doctoring to add clarification in the documentation.

Checklist

Put an x in the boxes that apply.

  • [ x] I have read the CONTRIBUTING document
  • [ x] 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
  • [ x] I have updated the necessary documentation (if needed)

yuchaoran2011 and others added 2 commits November 24, 2025 14:10
Clarified the apply_fn argument in the docstring to include details about its parameters.
@yuchaoran2011 yuchaoran2011 changed the title Patch 1 Added clarification to apply_fn parameter of apply_to_modules Nov 24, 2025
Copy link
Copy Markdown
Member

@awni awni left a comment

Choose a reason for hiding this comment

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

Ty!

@awni awni merged commit b054838 into ml-explore:main Nov 26, 2025
12 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