Skip to content

Conversation

@melissawm
Copy link
Collaborator

Description

This PR fixes the RTD documentation generation and deployment by eliminating many formatting issues, some importing errors and warnings resulting from the docstring generation via apidoc.

The main issue I fixed was to remove many of the docs dependencies, since they can be mocked in the conf.py file and that makes the docs generation process faster and lighter. I also fixed a couple of typos, and reviewed the installation instructions which looked to me to be outdated (please confirm).

This is a big PR since it involves many files, but changes are all in docstrings, so should not have any effect on actual code. In addition to fixing warnings, I also went ahead and reviewed as many docstrings as I could to fix formatting, make them consistent and better looking for the generated documentation website. Docstrings are written in rst format, and some of them were written in a markdown flavor - this is something to be aware of in the future (see https://www.sphinx-doc.org/en/master/usage/restructuredtext/basics.html)

Tests

Documentation builds correctly (and quickly) locally.

Checklist

Before submitting this PR, please make sure (put X in square brackets):

  • I have performed a self-review of my code. For an optional AI review, add the gemini-review label.
  • I have necessary comments in my code, particularly in hard-to-understand areas.
  • I have run end-to-end tests tests and provided workload links above if applicable.
  • I have made or will make corresponding changes to the doc if needed, including adding new documentation pages to the relevant Table of Contents (toctree directive) as explained in our documentation.

@codecov
Copy link

codecov bot commented Jan 28, 2026

Codecov Report

❌ Patch coverage is 0% with 18 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/MaxText/kernels/jax_flash_attention.py 0.00% 17 Missing ⚠️
src/MaxText/utils/ckpt_conversion/to_maxtext.py 0.00% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

@melissawm
Copy link
Collaborator Author

mdformat should not be running on all files here, as far as I understand. I'll investigate and solve the remaining CI checks.


# 3. Install MaxText and its dependencies
uv pip install maxtext --resolution=lowest
install_maxtext_github_deps
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think this has been removed unintentionally?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Actually this was removed intentionally - I can't find this file in the codebase, and it is not necessary for installation, so I figured the installation instructions were outdated (as noted in my first comment)

Can you confirm what the correct instructions are? Thanks!

Copy link
Collaborator

Choose a reason for hiding this comment

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

I think that this line should stay. I dont know which file it points to but I believe its necessary for dependency installation,

Copy link
Collaborator

Choose a reason for hiding this comment

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

The content in this doc does need a refresh though. Lets work on it on a different PR :))

Copy link
Collaborator

@jacoguzo jacoguzo left a comment

Choose a reason for hiding this comment

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

Added some comments, ideally someone from ENG should review too.


# for import docs
-r base_requirements/requirements.txt
google-tunix
Copy link
Collaborator

Choose a reason for hiding this comment

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

What is the effect of removing these dependencies?

"google_cloud_mldiagnostics",
"jetstream",
"librosa",
"ml_goodput_measurement",
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why are these libraries being imported to the docs? What is the effect of removing them?


# 3. Install MaxText and its dependencies
uv pip install maxtext --resolution=lowest
install_maxtext_github_deps
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think that this line should stay. I dont know which file it points to but I believe its necessary for dependency installation,


# 3. Install MaxText and its dependencies
uv pip install maxtext --resolution=lowest
install_maxtext_github_deps
Copy link
Collaborator

Choose a reason for hiding this comment

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

The content in this doc does need a refresh though. Lets work on it on a different PR :))

from MaxText import pyconfig
from MaxText.globals import MAXTEXT_PKG_DIR, MAXTEXT_ASSETS_ROOT
from maxtext.inference_microbenchmark import run_benchmarks
from maxtext.inference.inference_microbenchmark import run_benchmarks
Copy link
Collaborator

Choose a reason for hiding this comment

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

Does this change of "inference_microbenchmark" location impact our current recipes/ dependency installation for RL tutorials?

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.

3 participants