-
Notifications
You must be signed in to change notification settings - Fork 988
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[CI] Improve Docs CI Efficiency #3587
Merged
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
6fca9d4
[CI] Improve Docs CI efficiency
shuaills 79b614e
Merge branch 'main' into CI/mem-fraction
shuaills 37f8468
Refactor CI and documentation notebook imports for better modularity
shuaills bfda436
Install parallel in CI workflows for notebook execution
shuaills dddc35e
Update PR test workflow to include scripts directory
shuaills d2dfd9c
Refactor Makefile and backend import for improved build process
shuaills cd3c1eb
Fix typo and refactor NextN export script for DeepSeek-V3
shuaills 4a1ba26
Add OpenAI client example to speculative decoding notebook
shuaills b4e0a9a
Add send_request notebook to backend documentation
shuaills File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,42 @@ | ||
# Minimal makefile for Sphinx documentation | ||
# | ||
|
||
# You can set these variables from the terminal, and also | ||
# from the environment for the first two. | ||
# Minimal Makefile for Sphinx documentation | ||
SPHINXOPTS ?= | ||
SPHINXBUILD ?= sphinx-build | ||
SOURCEDIR = . | ||
BUILDDIR = _build | ||
|
||
# Put it first so that "make" without argument is like "make help". | ||
help: | ||
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) | ||
|
||
# New target to compile Markdown and Jupyter Notebook files | ||
# Compile Notebook files and record execution time | ||
compile: | ||
find $(SOURCEDIR) -path "*/_build/*" -prune -o -name "*.ipynb" -print | while read nb; do \ | ||
if [ -f "$$nb" ]; then \ | ||
echo "Executing $$nb"; \ | ||
jupyter nbconvert --to notebook --execute --inplace "$$nb" \ | ||
--ExecutePreprocessor.timeout=600 \ | ||
--ExecutePreprocessor.kernel_name=python3 || exit 1; \ | ||
fi; \ | ||
done | ||
@set -e; \ | ||
echo "Starting Notebook compilation..."; \ | ||
mkdir -p logs; \ | ||
echo "Notebook execution timings:" > logs/timing.log; \ | ||
START_TOTAL=$$(date +%s); \ | ||
find $(SOURCEDIR) -path "*/_build/*" -prune -o -name "*.ipynb" -print0 | \ | ||
parallel -0 -j3 --halt soon,fail=1 ' \ | ||
NB_NAME=$$(basename {}); \ | ||
START_TIME=$$(date +%s); \ | ||
jupyter nbconvert --to notebook --execute --inplace "{}" \ | ||
--ExecutePreprocessor.timeout=600 \ | ||
--ExecutePreprocessor.kernel_name=python3; \ | ||
RET_CODE=$$?; \ | ||
END_TIME=$$(date +%s); \ | ||
ELAPSED_TIME=$$((END_TIME - START_TIME)); \ | ||
echo "$${NB_NAME}: $${ELAPSED_TIME}s" >> logs/timing.log; \ | ||
exit $$RET_CODE' || exit 1; \ | ||
END_TOTAL=$$(date +%s); \ | ||
TOTAL_ELAPSED=$$((END_TOTAL - START_TOTAL)); \ | ||
echo "---------------------------------" >> logs/timing.log; \ | ||
echo "Total execution time: $${TOTAL_ELAPSED}s" >> logs/timing.log; \ | ||
echo "All Notebook execution timings:" && cat logs/timing.log | ||
|
||
|
||
.PHONY: help Makefile compile | ||
.PHONY: help Makefile compile clean | ||
|
||
# Catch-all target: route all unknown targets to Sphinx using the new | ||
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). | ||
%: Makefile | ||
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) | ||
|
||
clean: | ||
rm -rf $(BUILDDIR)/* | ||
rm -rf $(BUILDDIR)/* logs/timing.log |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤔 do we really want to include CI logic in the docs? I am afraid that it might confuse some users since not everyone knows what CI is.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we do not have better way 😂