Skip to content

Commit

Permalink
[Doc] Fix the linkcheck CI job (ray-project#41598)
Browse files Browse the repository at this point in the history
- This PR fixes the linkcheck job by bypassing ci.sh, and using a docker container on the buildkite runner.
- This PR also fixes a ton of broken links that were causing linkcheck to fail (even without rate limit issues), mostly by removing links to examples that were deleted.
- I also removed the global depends_on in lint.rayci.yml; not all lint jobs require the same environment.

Signed-off-by: pdmurray <peynmurray@gmail.com>
Signed-off-by: Peyton Murray <peynmurray@gmail.com>
Co-authored-by: angelinalg <122562471+angelinalg@users.noreply.github.com>
  • Loading branch information
peytondmurray and angelinalg authored Dec 9, 2023
1 parent 284617d commit bacb0a8
Show file tree
Hide file tree
Showing 16 changed files with 80 additions and 259 deletions.
4 changes: 2 additions & 2 deletions .buildkite/build.rayci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ steps:
instance_type: medium
commands:
- bazel run //ci/ray_ci:build_in_docker -- docker --python-version {{matrix}}
--platform cu11.5.2 --platform cu11.6.2 --platform cu11.7.1
--platform cu11.5.2 --platform cu11.6.2 --platform cu11.7.1
--platform cu11.8.0 --platform cu12.1.1 --platform cpu
--image-type ray
--upload
Expand All @@ -114,7 +114,7 @@ steps:
instance_type: medium-arm64
commands:
- bazel run //ci/ray_ci:build_in_docker -- docker --python-version {{matrix}}
--platform cu11.5.2 --platform cu11.6.2 --platform cu11.7.1
--platform cu11.5.2 --platform cu11.6.2 --platform cu11.7.1
--platform cu11.8.0 --platform cu12.1.1 --platform cpu
--image-type ray
--architecture aarch64
Expand Down
34 changes: 32 additions & 2 deletions .buildkite/lint.rayci.yml
Original file line number Diff line number Diff line change
@@ -1,63 +1,93 @@
group: lint
depends_on:
- forge
steps:
- label: ":lint-roller: lint: clang format"
depends_on:
- forge
commands:
- pip install -c python/requirements_compiled.txt clang-format
- ./ci/lint/check-git-clang-format-output.sh

- label: ":lint-roller: lint: code format"
depends_on:
- forge
commands:
- pip install -c python/requirements_compiled.txt -r python/requirements/lint-requirements.txt
- FORMAT_SH_PRINT_DIFF=1 ./ci/lint/format.sh --all-scripts

- label: ":lint-roller: lint: untested code snippet"
depends_on:
- forge
commands:
- pip install -c python/requirements_compiled.txt semgrep
- semgrep ci --config semgrep.yml

- label: ":lint-roller: lint: banned words"
depends_on:
- forge
commands:
- ./ci/lint/check-banned-words.sh

- label: ":lint-roller: lint: doc readme"
depends_on:
- forge
commands:
- pip install -c python/requirements_compiled.txt docutils
- cd python && python setup.py check --restructuredtext --strict --metadata

- label: ":lint-roller: lint: dashboard format"
depends_on:
- forge
commands:
- ./ci/lint/check-dashboard-format.sh

- label: ":lint-roller: lint: copyright format"
depends_on:
- forge
commands:
- ./ci/lint/copyright-format.sh -c

- label: ":lint-roller: lint: bazel team"
depends_on:
- forge
commands:
- bazel query 'kind("cc_test", //...)' --output=xml | python ./ci/lint/check-bazel-team-owner.py
- bazel query 'kind("py_test", //...)' --output=xml | python ./ci/lint/check-bazel-team-owner.py

- label: ":lint-roller: lint: bazel buildifier"
depends_on:
- forge
commands:
- ./ci/lint/check-bazel-buildifier.sh

- label: ":lint-roller: lint: pytest format"
depends_on:
- forge
commands:
- pip install -c python/requirements_compiled.txt yq
- ./ci/lint/check-pytest-format.sh

- label: ":lint-roller: lint: test coverage"
depends_on:
- forge
commands:
- python ci/pipeline/check-test-run.py

- label: ":lint-roller: lint: api annotations"
depends_on:
- forge
instance_type: medium
commands:
- RAY_DISABLE_EXTRA_CPP=1 pip install -e python/[all]
- ./ci/lint/check_api_annotations.py

- label: ":lint-roller: lint: documentation style"
depends_on:
- forge
commands:
- ./ci/lint/check-documentation-style.sh

- label: ":lint-roller: lint: linkcheck"
instance_type: medium
command: make -C doc/ linkcheck
depends_on: docbuild
job_env: docbuild
7 changes: 0 additions & 7 deletions .buildkite/pipeline.test.yml

This file was deleted.

12 changes: 8 additions & 4 deletions doc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@
#

# You can set these variables from the command line.
# Allow linkcheck to run without treating warnings as errors; -W will
# fast-fail if enabled; it's better to gather the whole list of bad links at once.
SPHINXOPTS = -a -E -W -j auto
LINKCHECKOPTS = -a -E -j auto
SPHINXBUILD = sphinx-build
PAPER =
BUILDDIR = _build
Expand All @@ -13,9 +16,10 @@ $(error The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx in
endif

# Internal variables.
PAPEROPT_a4 = -D latex_paper_size=a4
PAPEROPT_letter = -D latex_paper_size=letter
ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source
PAPEROPT_a4 = -D latex_paper_size=a4
PAPEROPT_letter = -D latex_paper_size=letter
ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source
ALLLINKCHECKOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(LINKCHECKOPTS) source
# the i18n builder cannot share the environment and doctrees with the others
I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source

Expand Down Expand Up @@ -178,7 +182,7 @@ changes:
@echo "The overview file is in $(BUILDDIR)/changes."

linkcheck:
$(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck
$(SPHINXBUILD) -b linkcheck $(ALLLINKCHECKOPTS) $(BUILDDIR)/linkcheck
@echo
@echo "Link check complete; look for any errors in the above output " \
"or in $(BUILDDIR)/linkcheck/output.txt."
Expand Down
2 changes: 1 addition & 1 deletion doc/source/cluster/kubernetes/user-guides/config.md
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ To achieve this, it is simplest to use the same Ray image for the Ray head and a
In any case, do make sure that all Ray images in your CR carry the same Ray version and
Python version.
To distribute custom code dependencies across your cluster, you can build a custom container image,
using one of the [official Ray images](https://hub.docker.com/r/rayproject/ray>) as the base.
using one of the [official Ray images](https://hub.docker.com/r/rayproject/ray) as the base.
See {ref}`this guide <docker-images>` to learn more about the official Ray images.
For dynamic dependency management geared towards iteration and developement,
you can also use {ref}`Runtime Environments <runtime-environments>`.
Expand Down
8 changes: 6 additions & 2 deletions doc/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -249,10 +249,14 @@ def __init__(self, version: str):
"https://dev.mysql.com/doc/connector-python/en/",
# Returning 522s intermittently.
"https://lczero.org/",
# Returns 429 errors in Linkcheck due to too many requests
"https://archive.is/2022.12.16-171259/https://www.businessinsider.com/openai-chatgpt-trained-on-anyscale-ray-generative-lifelike-ai-models-2022-12",
# Returns 406 but remains accessible
"https://www.uber.com/blog/elastic-xgboost-ray/",
# Aggressive anti-bot checks
"https://archive.vn/*",
"https://archive.is/*",
# 429: Rate limited
"https://medium.com/*",
"https://towardsdatascience.com/*",
]

# -- Options for HTML output ----------------------------------------------
Expand Down
10 changes: 5 additions & 5 deletions doc/source/ray-contribute/docs.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,7 @@
" [API documentation](https://github.com/ray-project/ray/blob/master/doc/source/tune/api/api.rst).\n",
"- Notebooks, written in `.ipynb` format. All Tune examples are written as notebooks. These notebooks render in\n",
" the browser like `.md` or `.rst` files, but have the added benefit of adding launch buttons to the top of the\n",
" document, so that users can run the code themselves in either Binder or Google Colab. A good first example to look\n",
" at is [this Tune example](https://github.com/ray-project/ray/blob/master/doc/source/tune/examples/tune-serve-integration-mnist.ipynb).\n",
" document, so that users can run the code themselves in either Binder or Google Colab.\n",
"\n",
"## Fixing typos and improving explanations\n",
"\n",
Expand Down Expand Up @@ -232,9 +231,10 @@
"Sometimes you might want to add a completely new document to the Ray documentation, like adding a new\n",
"user guide or a new example.\n",
"\n",
"For this to work, you need to make sure to add the new document explicitly to the \n",
"[`_toc.yml` file](https://github.com/ray-project/ray/blob/master/doc/source/_toc.yml) that determines\n",
"the structure of the Ray documentation.\n",
"For this to work, you need to make sure to add the new document explicitly to a parent document's toctree, \n",
"which determines the structure of the Ray documentation. See \n",
"[the sphinx documentation](https://www.sphinx-doc.org/en/master/usage/restructuredtext/directives.html#directive-toctree) \n",
"for more information.\n",
"\n",
"Depending on the type of document you're adding, you might also have to make changes to an existing overview\n",
"page that curates the list of documents in question.\n",
Expand Down
60 changes: 3 additions & 57 deletions doc/source/ray-overview/examples.rst
Original file line number Diff line number Diff line change
Expand Up @@ -604,12 +604,6 @@ Ray Examples

Example of how to setup an RLlib algorithm against a locally running Unity3D editor

.. grid-item-card:: :bdg-secondary:`Code example`
:class-item: gallery-item rl
:link: https://github.com/ray-project/ray/blob/master/rllib/env/tests/test_env_with_subprocess.py

Example of how to ensure subprocesses spawned by envs are killed when RLlib exits.

.. grid-item-card:: :bdg-secondary:`Code example`
:class-item: gallery-item reinforcement-learning rllib
:link: https://github.com/ray-project/ray/blob/master/rllib/examples/custom_model_loss_and_metrics.py
Expand All @@ -618,22 +612,10 @@ Ray Examples

.. grid-item-card:: :bdg-secondary:`Code example`
:class-item: gallery-item reinforcement-learning rllib
:link: https://github.com/ray-project/ray/blob/master/rllib/examples/batch_norm_model.py
:link: https://github.com/ray-project/ray/blob/master/rllib/examples/models/batch_norm_model.py

Example of adding batch norm layers to a custom model.

.. grid-item-card:: :bdg-secondary:`Code example`
:class-item: gallery-item reinforcement-learning rllib
:link: https://github.com/ray-project/ray/blob/master/rllib/examples/eager_execution.py

Example of how to leverage TensorFlow eager to simplify debugging and design of custom models and policies.

.. grid-item-card:: :bdg-secondary:`Code example`
:class-item: gallery-item reinforcement-learning rllib
:link: https://github.com/ray-project/ray/blob/master/rllib/examples/custom_fast_model.py

Example of a "fast" Model learning only one parameter for tf and torch.

.. grid-item-card:: :bdg-secondary:`Code example`
:class-item: gallery-item reinforcement-learning rllib
:link: https://github.com/ray-project/ray/blob/master/rllib/examples/custom_model_api.py
Expand All @@ -642,13 +624,13 @@ Ray Examples

.. grid-item-card:: :bdg-secondary:`Code example`
:class-item: gallery-item reinforcement-learning rllib
:link: https://github.com/ray-project/ray/blob/master/rllib/examples/trajectory_view_api.py
:link: https://github.com/ray-project/ray/blob/master/rllib/examples/models/trajectory_view_utilizing_models.py

An example on how a model can use the trajectory view API to specify its own input.

.. grid-item-card:: :bdg-secondary:`Code example`
:class-item: gallery-item reinforcement-learning rllib
:link: https://github.com/ray-project/ray/blob/master/rllib/examples/mobilenet_v2_with_lstm.py
:link: https://github.com/ray-project/ray/blob/master/rllib/examples/models/mobilenet_v2_with_lstm_models.py

Implementations of `MobileNetV2` and `torch.hub (mobilenet_v2)`-wrapping example models.

Expand Down Expand Up @@ -682,24 +664,6 @@ Ray Examples

Example of how to output custom training metrics to TensorBoard.

.. grid-item-card:: :bdg-secondary:`Code example`
:class-item: gallery-item reinforcement-learning rllib tensorflow
:link: https://github.com/ray-project/ray/blob/master/rllib/examples/custom_tf_policy.py

How to setup a custom TFPolicy.

.. grid-item-card:: :bdg-secondary:`Code example`
:class-item: gallery-item reinforcement-learning rllib pytorch
:link: https://github.com/ray-project/ray/blob/master/rllib/examples/custom_torch_policy.py

How to setup a custom TorchPolicy.

.. grid-item-card:: :bdg-secondary:`Code example`
:class-item: gallery-item reinforcement-learning rllib
:link: https://github.com/ray-project/ray/blob/master/rllib/examples/rollout_worker_custom_workflow.py

Example of how to use RLlib's lower-level building blocks to implement a fully customized training workflow.

.. grid-item-card:: :bdg-secondary:`Code example`
:class-item: gallery-item reinforcement-learning rllib
:link: https://github.com/ray-project/ray/blob/master/rllib/examples/two_trainer_workflow.py
Expand Down Expand Up @@ -833,18 +797,6 @@ Ray Examples

Example of hierarchical training using the multi-agent API.

.. grid-item-card:: :bdg-secondary:`Code example`
:class-item: gallery-item reinforcement-learning rllib
:link: https://github.com/ray-project/ray/blob/master/rllib/examples/iterated_prisoners_dilemma_env.py

Example of an iterated prisoner's dilemma environment solved by RLlib.

.. grid-item-card:: :bdg-secondary:`Code example`
:class-item: gallery-item reinforcement-learning rllib
:link: https://github.com/ray-project/ray/blob/master/rllib/examples/partial_gpus.py

Example of how to setup fractional GPUs for learning (driver) and environment rollouts (remote workers).

.. grid-item-card:: :bdg-secondary:`Code example`
:class-item: gallery-item reinforcement-learning rllib
:link: https://github.com/ray-project/ray/blob/master/rllib/examples/nested_action_spaces.py
Expand All @@ -857,12 +809,6 @@ Ray Examples

Example of how to handle variable-length or parametric action spaces

.. grid-item-card:: :bdg-secondary:`Code example`
:class-item: gallery-item reinforcement-learning rllib
:link: https://github.com/ray-project/ray/blob/master/rllib/examples/custom_observation_filters.py

How to filter raw observations coming from the environment for further processing by the Agent's model(s).

.. grid-item-card:: :bdg-secondary:`Code example`
:class-item: gallery-item reinforcement-learning rllib
:link: https://github.com/ray-project/ray/blob/master/rllib/examples/complex_struct_space.py
Expand Down
15 changes: 2 additions & 13 deletions doc/source/ray-overview/ray-libraries.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,8 @@ more information.

.. dropdown:: Adding Your Integration

To add an integration, simply add an entry to the `projects` list of our
Gallery YAML on `GitHub <https://github.com/ray-project/ray/tree/master/doc/source/ray-overview/eco-gallery.yml>`_.

.. code-block:: yaml
- name: the integration link button text
section_title: The section title for this integration
description: A quick description of your library and its integration with Ray
website: The URL of your website
repo: The URL of your project on GitHub
image: The URL of a logo of your project
That's all!
To add an integration add an entry to this file, using the same
``grid-item-card`` directive that the other examples use.

.. grid:: 1 2 2 3
:gutter: 1
Expand Down
19 changes: 1 addition & 18 deletions doc/source/rllib/feature_overview.rst
Original file line number Diff line number Diff line change
@@ -1,23 +1,6 @@
.. List of most important features of RLlib, with sigil-like buttons for each of the features.
To be included into different rst files.
.. container:: clear-both

.. container:: buttons-float-left

.. https://docs.google.com/drawings/d/1i_yoxocyEOgiCxcfRZVKpNh0R_-2tQZOX4syquiytAI/edit?skip_itp2_check=true&pli=1
.. image:: images/sigils/rllib-sigil-tf-and-torch.svg
:width: 100
:target: https://github.com/ray-project/ray/blob/master/rllib/examples/custom_tf_policy.py

.. container::

The most **popular deep-learning frameworks**: `PyTorch <https://github.com/ray-project/ray/blob/master/rllib/examples/custom_torch_policy.py>`_ and `TensorFlow
(tf1.x/2.x static-graph/eager/traced) <https://github.com/ray-project/ray/blob/master/rllib/examples/custom_tf_policy.py>`_.


.. container:: clear-both

.. container:: buttons-float-left
Expand All @@ -26,7 +9,7 @@
.. image:: images/sigils/rllib-sigil-distributed-learning.svg
:width: 100
:target: https://github.com/ray-project/ray/blob/master/rllib/examples/tune/framework.py
:target: https://github.com/ray-project/ray/blob/master/rllib/utils/framework.py

.. container::

Expand Down
5 changes: 0 additions & 5 deletions doc/source/rllib/rllib-advanced-api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,6 @@ Sometimes, it is desirable to have full control over training, but still run ins
Tune supports :ref:`custom trainable functions <trainable-docs>` that can be used to
implement `custom training workflows (example) <https://github.com/ray-project/ray/blob/master/rllib/examples/custom_train_fn.py>`__.

For even finer-grained control over training, you can use RLlib's lower-level
`building blocks <rllib-concepts.html>`__ directly to implement
`fully customized training workflows <https://github.com/ray-project/ray/blob/master/rllib/examples/rollout_worker_custom_workflow.py>`__.


Curriculum Learning
~~~~~~~~~~~~~~~~~~~

Expand Down
Loading

0 comments on commit bacb0a8

Please sign in to comment.