Skip to content

Commit 0ba93e2

Browse files
Merge pull request #3666 from AI-Hypercomputer:source_note
PiperOrigin-RevId: 900482849
2 parents 083293f + 3fe90eb commit 0ba93e2

3 files changed

Lines changed: 38 additions & 0 deletions

File tree

docs/build_maxtext.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,25 @@ If you plan to contribute to MaxText or need the latest unreleased features, ins
7878
# Clone the repository
7979
git clone https://github.com/AI-Hypercomputer/maxtext.git
8080
cd maxtext
81+
```
82+
83+
:::\{only} is_not_latest
84+
85+
By default, cloning the repository provides the latest version (**HEAD**).
86+
If you wish to use the latest features, please follow the [latest guide](https://maxtext.readthedocs.io/en/latest/install_maxtext.html).
87+
If you want to ensure compatibility with the specific version of the documentation
88+
you are currently viewing, you must checkout the corresponding tag for that version
89+
before proceeding with the installation.
90+
91+
```{eval-rst}
92+
.. parsed-literal::
8193
94+
git checkout |version|
95+
```
96+
97+
:::
98+
99+
```bash
82100
# Create virtual environment
83101
export VENV_NAME=<your virtual env name> # e.g., docker_venv
84102
uv venv --python 3.12 --seed ${VENV_NAME?}

docs/conf.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
# pylint: disable=redefined-builtin
4343
copyright = "2023–2026, Google LLC"
4444
author = "MaxText developers"
45+
version = os.environ.get("READTHEDOCS_VERSION", "latest")
4546

4647
# -- General configuration ---------------------------------------------------
4748
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
@@ -250,3 +251,6 @@ def setup(app):
250251
logger = logging.getLogger("sphinx")
251252
warning_handler, *_ = [h for h in logger.handlers if isinstance(h, sphinx_logging.WarningStreamHandler)]
252253
warning_handler.filters.insert(0, FilterSphinxWarnings(app))
254+
255+
if version != "latest":
256+
app.tags.add("is_not_latest")

docs/install_maxtext.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,22 @@ environment to avoid dependency conflicts.
112112
cd maxtext
113113
```
114114
115+
:::\{only} is_not_latest
116+
117+
By default, cloning the repository provides the latest version (**HEAD**).
118+
If you wish to use the latest features, please follow the [latest guide](https://maxtext.readthedocs.io/en/latest/install_maxtext.html).
119+
If you want to ensure compatibility with the specific version of the documentation
120+
you are currently viewing, you must checkout the corresponding tag for that version
121+
before proceeding with the installation.
122+
123+
```{eval-rst}
124+
.. parsed-literal::
125+
126+
git checkout |version|
127+
```
128+
129+
:::
130+
115131
2. Create virtual environment:
116132
117133
```bash

0 commit comments

Comments
 (0)