Skip to content

Commit

Permalink
Fix docs not showing error, remove circleci docs scripts (#105678)
Browse files Browse the repository at this point in the history
Docs were not exiting with failure, for example https://github.com/pytorch/pytorch/actions/runs/5604612586/job/15184094038#step:9:1131 because the if statement returned 0 if we want to exit.

Also get rid of the circleci scripts since they aren't used anywhere.

Example error:
```
copying static files... done
copying extra files... done
dumping search index in English (code: en)... done
dumping object inventory... done
build finished with problems, 1 warning.
make: *** [Makefile:49: html] Error 1
+ code=2
+ '[' 2 -ne 0 ']'
+ set +x
=========================
/opt/conda/envs/py_3.8/lib/python3.8/site-packages/torch/nn/parallel/comm.py:docstring of torch.nn.parallel.comm.scatter:1: WARNING: more than one target found for cross-reference 'Stream': torch.cuda.Stream, torch.cuda.streams.Stream, torch.cpu.Stream
=========================
Docs build failed. If the failure is not clear, scan back in the log
for any WARNINGS or for the line build finished with problems
(tried to echo the WARNINGS above the ==== line)
=========================
+ return 2
+ exit 0
```
Pull Request resolved: #105678
Approved by: https://github.com/seemethere
  • Loading branch information
clee2000 authored and pytorchmergebot committed Jul 20, 2023
1 parent e47fad6 commit 07ea344
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 261 deletions.
9 changes: 3 additions & 6 deletions .ci/pytorch/python_doc_push_script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,8 @@ pushd docs

# Build the docs
if [ "$is_main_doc" = true ]; then
if ! build_docs html; then
exit $?
fi
build_docs html || exit $?

make coverage
# Now we have the coverage report, we need to make sure it is empty.
# Count the number of lines in the file and turn that number into a variable
Expand All @@ -110,9 +109,7 @@ if [ "$is_main_doc" = true ]; then
fi
else
# skip coverage, format for stable or tags
if ! build_docs html-stable; then
exit $?
fi
build_docs html-stable || exit $?
fi

# Move them into the docs repo
Expand Down
105 changes: 0 additions & 105 deletions .circleci/scripts/cpp_doc_push_script.sh

This file was deleted.

150 changes: 0 additions & 150 deletions .circleci/scripts/python_doc_push_script.sh

This file was deleted.

0 comments on commit 07ea344

Please sign in to comment.