-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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] Fix broken links in Ray docs - turn on nitpicky mode #39658
Comments
Nice! I tried this last week as well but did not follow up, thanks for creating an issue to track this. 😄 |
Moving on this now. This will be accomplished in a few separate PRs to minimize codeowner impact.
nitpick_ignore_regex = [
('py:class', '.*')
] to ignore the sphinx issues that arise from using user-defined types. This has been something brought up multiple times on StackOverflow and the Sphinx repo, so this has been a persistent issue for Sphinx in the past. There might be a way to get rid of this rule but for now this could be a good first step. |
…#45160) ## Why are these changes needed? This PR adds the overridable methods for `RayDaskCallback` to the base class. Previously, the user had a few choices for instantiating a `RayDaskCallback`: ```python RayDaskCallback(ray_presubmit=my_custom_presubmit_func) ``` or ```python with RayDaskCallback(ray_presubmit=my_custom_presubmit_func) as cb: ... ``` or by subclassing: ```python class MyCallback(RayDaskCallback): def _ray_presubmit(self, task, key, deps): .... ``` Currently the constructor for `RayDaskCallback` dynamically generates the callback methods and attaches them to the class instance upon instantiation using `setattr`. This pattern doesn't work with developer tooling including language servers, static code analysis tools, or documentation generators because these functions are generated dynamically. Additionally the documentation for dask-on-ray instructs users to use the third approach (using subclassing) rather than passing methods to the constructor. Finally, the docstring for `RayDaskCallback.__init__` currently has function signatures and pseudo-docstrings for the callback methods the user should be implementing. This docstring is itself malformed, so Sphinx mistakenly tries to interpret parts of this as references which do not exist. At the request of @c21 I've actually implemented these functions as they appear in the docstring. Type hints are incomplete here, but match what was already in the previous docstring. I also added a summary in the dask-on-ray documentation. Unblocks #39658.
## Why are these changes needed? This PR cleans up the last remaining broken links in the RLlib documentation. ## Related issue number Partially completes #39658. ## Checks - [x] I've signed off every commit(by using the -s flag, i.e., `git commit -s`) in this PR. - [x] I've run `scripts/format.sh` to lint the changes in this PR. - [x] I've included any doc changes needed for https://docs.ray.io/en/master/. - [x] 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. - [x] 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 - [x] Unit tests - [ ] Release tests - [ ] This PR is not tested :( Signed-off-by: pdmurray <peynmurray@gmail.com>
Description
Running sphinx with nitpicky mode enabled generates warnings about all references that cannot be found. Currently we don't do this, and as a result we are missing broken sphinx references, like these the two references to private methods in this section.
I ran
make develop
with nitpicky mode enabled and count 5435 broken references in the documentation. Lots of these will probably be fixable with some tweaks to documentation build parameters, intersphinx mappings, and so on, but I'm starting this issue here to keep track of them. CC @angelinalgHere's the full list: warnings.txt
Aside from fixing these reference, we should also aim to enable nitpicky mode in the sphinx docs so these don't keep sneaking past CI.
The text was updated successfully, but these errors were encountered: