driazati commented on a change in pull request #9971:
URL: https://github.com/apache/tvm/pull/9971#discussion_r793943633
##########
File path: tests/scripts/task_python_docs.sh
##########
@@ -34,14 +32,78 @@ cleanup()
}
trap cleanup 0
-# cleanup old states
-rm -rf docs/_build
-rm -rf docs/_staging
-mkdir -p docs/_build/html
-mkdir -p docs/_staging/html
-rm -rf docs/gen_modules
-rm -rf docs/doxygen
+clean_files() {
+ # cleanup old states
+ rm -rf docs/_build
+ rm -rf docs/_staging
+ mkdir -p docs/_build/html
+ mkdir -p docs/_staging/html
+ rm -rf docs/gen_modules
+ rm -rf docs/doxygen
+ find . -type f -path "*.pyc" | xargs rm -f
+}
+
+sphinx_precheck() {
+ clean_files
+ echo "PreCheck sphinx doc generation WARNINGS.."
+ make cython3
+
+ pushd docs
+ make clean
+ TVM_TUTORIAL_EXEC_PATTERN=none make html 2>&1 | tee /tmp/$$.log.txt
+ check_sphinx_warnings "docs"
+ popd
+}
+
+
+function join_by { local IFS="$1"; shift; echo "$*"; }
+
+IGNORED_WARNINGS=(
+ '__mro__'
+ 'UserWarning'
+ 'FutureWarning'
+ 'tensorflow'
+ 'Keras'
+ 'pytorch'
+ 'TensorFlow'
+ 'coremltools'
+ '403'
+ 'git describe'
+ 'scikit-learn version'
+ 'doing serial write'
+ 'gen_gallery extension is not safe for parallel'
+ 'strategy:conv2d NHWC layout is not optimized for x86 with autotvm.'
+ 'strategy:depthwise_conv2d NHWC layout is not optimized for x86 with
autotvm.'
+ 'autotvm:Cannot find config for target=llvm -keys=cpu -link-params=0'
+ 'autotvm:One or more operators have not been tuned. Please tune your model
for better performance. Use DEBUG logging level to see more details.'
+ 'autotvm:Cannot find config for target=cuda -keys=cuda,gpu'
+)
+
+JOINED_WARNINGS=$(join_by '|' "${IGNORED_WARNINGS[@]}")
Review comment:
ideally the entire CI would be mostly Python and minimal bash instead of
the opposite which we have right now. but to keep this PR simple since it does
re-arrange a bunch of stuff I think we should leave it as is for now and leave
migrating to Python for a follow up
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]