Skip to content
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

[Doc] Run pre-commit on rllib docs #47005

Merged

Conversation

peytondmurray
Copy link
Contributor

Why are these changes needed?

Currently we have no linting on any part of the docs code. This PR runs pre-commit on the rllib docs.

This PR fixes the following issues:

trim trailing whitespace.................................................Failed
- hook id: trailing-whitespace
- exit code: 1
- files were modified by this hook

Fixing doc/source/rllib/rllib-rlmodule.rst
Fixing doc/source/rllib/rllib-offline.rst
Fixing doc/source/rllib/images/catalog/ppo_catalog_and_rlm_diagram.svg
Fixing doc/source/rllib/key-concepts.rst
Fixing doc/source/rllib/rllib-fault-tolerance.rst
Fixing doc/source/rllib/images/connector-diagram.svg
Fixing doc/source/rllib/images/catalog/catalog_rlmspecs_diagram.svg
Fixing doc/source/rllib/images/catalog/catalog_and_rlm_diagram.svg
Fixing doc/source/rllib/rllib-learner.rst

fix end of files.........................................................Failed
- hook id: end-of-file-fixer
- exit code: 1
- files were modified by this hook

Fixing doc/source/rllib/package_ref/policy.rst
Fixing doc/source/rllib/images/episodes/sa_episode_getters.svg
Fixing doc/source/rllib/images/algos/sac-architecture.svg
Fixing doc/source/rllib/package_ref/evaluation.rst
Fixing doc/source/rllib/images/multi-flat.svg
Fixing doc/source/rllib/images/algos/marwil-architecture.svg
Fixing doc/source/rllib/images/rllib-config.svg
Fixing doc/source/rllib/images/sigils/cont-actions.svg
Fixing doc/source/rllib/images/sigils/rllib-sigil-vector-envs.svg
Fixing doc/source/rllib/images/algos/ppo-architecture.svg
Fixing doc/source/rllib/images/sigils/rllib-sigil-tf-and-torch.svg
Fixing doc/source/rllib/images/a2c-arch.svg
Fixing doc/source/rllib/images/sigils/rllib-sigil-distributed-learning.svg
Fixing doc/source/rllib/images/episodes/sa_episode_non_finalized.svg
Fixing doc/source/rllib/images/dqn-arch.svg
Fixing doc/source/rllib/images/episodes/sa_episode_non_finalized_vs_finalized.svg
Fixing doc/source/rllib/images/algos/appo-architecture.svg
Fixing doc/source/rllib/images/sigils/rllib-sigil-multi-agent.svg
Fixing doc/source/rllib/images/sigils/multi-gpu.svg
Fixing doc/source/rllib/images/episodes/usage_of_episodes.svg
Fixing doc/source/rllib/images/rollout_worker_class_overview.svg
Fixing doc/source/rllib/images/catalog/ppo_catalog_and_rlm_diagram.svg
Fixing doc/source/rllib/images/sigils/new-api-stack.svg
Fixing doc/source/rllib/images/sigils/old-api-stack.svg
Fixing doc/source/rllib/images/sigils/rllib-sigil-offline-rl.svg
Fixing doc/source/rllib/key-concepts.rst
Fixing doc/source/rllib/images/impala-arch.svg
Fixing doc/source/rllib/images/algos/dqn-architecture.svg
Fixing doc/source/rllib/images/episodes/sa_episode.svg
Fixing doc/source/rllib/images/sigils/rllib-sigil-external-simulators.svg
Fixing doc/source/rllib/images/episodes/sa_episode_finalized.svg
Fixing doc/source/rllib/images/rllib-envs.svg
Fixing doc/source/rllib/images/dreamerv3/atari100k_1_vs_4gpus.svg
Fixing doc/source/rllib/images/apex-arch.svg
Fixing doc/source/rllib/images/rllib-index-header.svg
Fixing doc/source/rllib/images/algos/icm-architecture.svg
Fixing doc/source/rllib/images/sigils/multi-agent.svg
Fixing doc/source/rllib/images/sigils/multi-node-multi-gpu.svg
Fixing doc/source/rllib/images/env_classes_overview.svg
Fixing doc/source/rllib/images/connector-diagram.svg
Fixing doc/source/rllib/images/rllib-components.svg
Fixing doc/source/rllib/images/algos/impala-architecture.svg
Fixing doc/source/rllib/images/rllib-sample-collection.svg
Fixing doc/source/rllib/images/policy_classes_overview.svg
Fixing doc/source/rllib/images/dreamerv3/dmc_1_vs_4gpus.svg
Fixing doc/source/rllib/images/algos/dreamerv3-architecture.svg
Fixing doc/source/rllib/package_ref/replay-buffers.rst
Fixing doc/source/rllib/images/catalog/catalog_rlmspecs_diagram.svg
Fixing doc/source/rllib/images/dreamerv3/pong_1_2_and_4gpus.svg
Fixing doc/source/rllib/images/ddppo-arch.svg
Fixing doc/source/rllib/images/multi-agent.svg
Fixing doc/source/rllib/images/rllib-logo.svg
Fixing doc/source/rllib/images/algos/curiosity-architecture.svg
Fixing doc/source/rllib/images/episodes/sa_episode_cut_and_lookback.svg
Fixing doc/source/rllib/images/rllib-trajectory-view-example.svg
Fixing doc/source/rllib/images/rllib-api.svg
Fixing doc/source/rllib/images/rllib-stack.svg
Fixing doc/source/rllib/images/sigils/discr-actions.svg
Fixing doc/source/rllib/images/algos/bc-architecture.svg
Fixing doc/source/rllib/images/rllib-batch-modes.svg
Fixing doc/source/rllib/images/rllib-external.svg
Fixing doc/source/rllib/images/catalog/catalog_and_rlm_diagram.svg
Fixing doc/source/rllib/images/sigils/single-agent.svg
Fixing doc/source/rllib/package_ref/utils.rst
Fixing doc/source/rllib/images/trainer_class_overview.svg
Fixing doc/source/rllib/rllib-learner.rst

check for added large files..............................................Passed
check python ast.........................................................Passed
check json...........................................(no files to check)Skipped
check toml...........................................(no files to check)Skipped
black....................................................................Passed
flake8...................................................................Passed
prettier.............................................(no files to check)Skipped
mypy.................................................(no files to check)Skipped
isort (python)...........................................................Passed
rst directives end with two colons.......................................Passed
rst ``inline code`` next to normal text..................................Failed
- hook id: rst-inline-touching-normal
- exit code: 1

doc/source/rllib/rllib-advanced-api.rst:268:An evaluation step runs - using its own ``EnvRunner``s - for ``evaluation_duration``

use logger.warning(......................................................Passed
check for not-real mock methods..........................................Passed
ShellCheck v0.9.0....................................(no files to check)Skipped
clang-format.........................................(no files to check)Skipped
Google Java Formatter................................(no files to check)Skipped
Check for Ray docstyle violations........................................Passed
Check for Ray import order violations....................................Passed

Related issue number

Part of #42587.

Checks

  • I've signed off every commit(by using the -s flag, i.e., git commit -s) in this PR.
  • I've run scripts/format.sh to lint the changes in this PR.
  • I've included any doc changes needed for https://docs.ray.io/en/master/.
    • I've added any new APIs to the API Reference. For example, if I added a
      method in Tune, I've added it in doc/source/tune/api/ under the
      corresponding .rst file.
  • I've made sure the tests are passing. Note that there might be a few flaky tests, see the recent failures at https://flakey-tests.ray.io/
  • Testing Strategy
    • Unit tests
    • Release tests
    • This PR is not tested :(

@can-anyscale
Copy link
Collaborator

QQ: is this a local run or we have a ci lint check; if not the former should we have the ci lint check as well to lock in the win? thankks

@peytondmurray
Copy link
Contributor Author

This is a local run - we do not have any kind of lint workflow set up to run on the docs at the moment (which is part of the reason there are issues to fix).

Copy link
Collaborator

@can-anyscale can-anyscale left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@peytondmurray peytondmurray added rllib RLlib related issues docs An issue or change related to documentation labels Aug 14, 2024
Copy link
Contributor

@sven1977 sven1977 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@peytondmurray peytondmurray added the go add ONLY when ready to merge, run all tests label Aug 15, 2024
Signed-off-by: pdmurray <peynmurray@gmail.com>
@peytondmurray peytondmurray force-pushed the 42587-pre-commit-docs-rllib branch from 2afee0d to 515731d Compare August 15, 2024 06:09
@can-anyscale can-anyscale merged commit 7f8725c into ray-project:master Aug 16, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs An issue or change related to documentation go add ONLY when ready to merge, run all tests rllib RLlib related issues
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants