Skip to content

Commit 25b3e9d

Browse files
wang2yn84The tunix Authors
authored andcommitted
[Tunix] Moves the smoke_tests folder to top level.
FUTURE_COPYBARA_INTEGRATE_REVIEW=#888 from ev-br:doc_ci_check 03f8ca7 PiperOrigin-RevId: 846423327
1 parent 1230131 commit 25b3e9d

File tree

10 files changed

+231
-250
lines changed

10 files changed

+231
-250
lines changed

.github/workflows/build_docs.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Check the Documentation Build
2+
3+
on:
4+
pull_request:
5+
types: [opened, synchronize]
6+
workflow_dispatch:
7+
8+
permissions:
9+
contents: read
10+
11+
jobs:
12+
build-docs:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Checkout repository
16+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
17+
with:
18+
persist-credentials: false
19+
20+
- name: Set up Python
21+
uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0
22+
with:
23+
python-version: '3.12'
24+
cache: 'pip' # caching pip dependencies
25+
26+
- name: Install dependencies
27+
run: pip install .[docs]
28+
29+
- name: Build documentation
30+
run: |
31+
pushd docs # XXX _collection/examples not found if run from root
32+
sphinx-build -W -b html . ./_build/html

.github/workflows/cpu-tests.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,8 @@ jobs:
4545
- name: Install the tunix wheel
4646
run: |
4747
python -m pip install --upgrade pip
48-
python -m pip install google_tunix-*-py3-none-any.whl
48+
WHEEL=$(ls -1 google_tunix-*-py3-none-any.whl | head -n1)
49+
python -m pip install "${WHEEL}[prod]"
4950
python -m pip install pytest
5051
5152
- name: Verify Tunix imports from installed package

.github/workflows/tpu-tests.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,8 @@ jobs:
215215
pip list | egrep 'jax|flax|libtpu'
216216
cd ..
217217
git clone https://github.com/sgl-project/sglang-jax.git && cd sglang-jax/python && pip install -e . --force-reinstall && cd ../..
218+
# TODO(b/470113586): Remove this test once the bug is fixed.
219+
pip install jax[tpu]==0.8.1 --force-reinstall
218220
pip list | egrep 'jax|flax|libtpu'
219221
220222
# Install bookworm, vllm container defaults to bullseye causes segfault for sglang-jax.

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
# Documentation
2222
/docs/_build/
2323
/docs/_collections/
24+
/docs/jupyter_execute
2425
/docs/sg_execution_times.rst
2526
/docs/generated
2627
build/*

docs/conf.py

Lines changed: 32 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66

77
import logging
88

9+
from sphinx.util import logging as sphinx_logging
10+
911
# -- Project information -----------------------------------------------------
1012
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information
1113

@@ -32,8 +34,10 @@
3234
"_build",
3335
"Thumbs.db",
3436
".DS_Store",
35-
"_collections/examples/model_load/from_safetensor_load/*"
36-
"_collections/examples/rl/README.md",
37+
(
38+
"_collections/examples/model_load/from_safetensor_load/*"
39+
"_collections/examples/rl/README.md"
40+
),
3741
"_collections/examples/sft/**",
3842
"_collections/examples/deepscaler/**",
3943
]
@@ -47,7 +51,7 @@
4751
html_static_path = ["_static"]
4852
html_logo = "_static/img/tunix.png"
4953
html_css_files = [
50-
'custom.css',
54+
"custom.css",
5155
]
5256

5357
html_theme_options = {
@@ -119,23 +123,29 @@
119123
}
120124

121125

122-
123126
class FilterSphinxWarnings(logging.Filter):
124-
"""Filter autosummary 'duplicate object description' warnings.
125-
126-
These warnings are unnecessary as they do not cause missing documentation
127-
or rendering issues, so it is safe to filter them out.
128-
"""
129-
130-
def __init__(self, app):
131-
self.app = app
132-
super().__init__()
133-
134-
def filter(self, record: logging.LogRecord) -> bool:
135-
msg = record.getMessage()
136-
137-
filter_out = ("duplicate object description",)
138-
139-
if msg.strip().startswith(filter_out):
140-
return False
141-
return True
127+
"""Filter autosummary 'duplicate object description' warnings.
128+
129+
These warnings are unnecessary as they do not cause missing documentation
130+
or rendering issues, so it is safe to filter them out.
131+
"""
132+
133+
def __init__(self, app):
134+
self.app = app
135+
super().__init__()
136+
137+
def filter(self, record: logging.LogRecord) -> bool:
138+
msg = record.getMessage()
139+
filter_out = ("duplicate object description",)
140+
return not msg.strip().startswith(filter_out)
141+
142+
143+
def setup(app):
144+
"""Set up custom logging filters."""
145+
logger = logging.getLogger("sphinx")
146+
warning_handler, *_ = [
147+
h
148+
for h in logger.handlers
149+
if isinstance(h, sphinx_logging.WarningStreamHandler)
150+
]
151+
warning_handler.filters.insert(0, FilterSphinxWarnings(app))

docs/ext/coverage_check.py

Lines changed: 0 additions & 91 deletions
This file was deleted.

examples/README.md

Lines changed: 0 additions & 130 deletions
This file was deleted.

0 commit comments

Comments
 (0)