-
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
[Tune][Doc] Restructure API reference #32311
[Tune][Doc] Restructure API reference #32311
Conversation
Signed-off-by: Justin Yu <[email protected]>
Signed-off-by: Justin Yu <[email protected]>
Signed-off-by: Justin Yu <[email protected]>
Signed-off-by: Justin Yu <[email protected]>
Signed-off-by: Justin Yu <[email protected]>
Signed-off-by: Justin Yu <[email protected]>
Signed-off-by: Justin Yu <[email protected]>
Signed-off-by: Justin Yu <[email protected]>
Signed-off-by: Justin Yu <[email protected]>
Signed-off-by: Justin Yu <[email protected]>
Signed-off-by: Justin Yu <[email protected]>
.gitignore
Outdated
/doc/source/*/api/doc/ | ||
/doc/source/cluster/running-applications/job-submission/doc/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can these be combined somehow? Special case for the newly added cluster autogenerated files.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@c21 should we conform to one structure? Though it does mess with backwards compatibility for this job submission page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes I think we should conform to one structure (non-blocking for this PR). Let me take a look how easy the change is.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was also a discussion about whether we should do reference/api
or api/doc
as the standard.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also looks like I can use /doc/source/**/doc
as wildcard for nested dirs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Talked to @jjyao separately. We can use api/doc
here. To rename to reference/api
, we plan to have a separate discussion.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just keep in mind that api
leads to shorter URLs, too. but consistency is more important
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall looks great, most of my comments are about changes we can make in the future 😄
@@ -240,7 +240,7 @@ Trainables can themselves be distributed. If your trainable function / class cre | |||
that also consume CPU / GPU resources, you will want to add more bundles to the :class:`PlacementGroupFactory` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's already mentioned at the top of this file, but most/all of this page should exist in a user guide instead. We don't have to make the change in this PR though!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed, I am thinking:
- Move high level trainable stuff to key concepts trainable section
- Move checkpointing guides to a new "Tune Checkpointing" user guide (the old one didn't have much to do with checkpointing, and a new one needs to be made)
- Move the advanced resource allocation section to the tune resources user guide
- Reuse actors section can probably go to tune lifecycle user guide.
.. autosummary:: | ||
:toctree: doc/ | ||
|
||
flaml.BlendSearch |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess this is because doc requirements != Tune requirements? How should we go about fixing this?
|
||
Searcher |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: @c21 any suggested practice for separating out the constructor? I saw in Datasets APIs we explicitly do.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@matthewdeng - I think it's fine to keep it as it is here. I was following other system, such as Pandas - https://pandas.pydata.org/docs/reference/series.html .
.. autosummary:: | ||
:toctree: doc/ | ||
|
||
Stopper |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we explicitly set this include _call_
as was done previously?
Currently this shows __init__
instead and feels a bit mismatched.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think it's actually possible to include specific members with the autosummary
. Best thing I could do was have it right below.
@@ -282,7 +282,7 @@ parts: | |||
- file: tune/examples/exercises | |||
title: "Exercises" | |||
- file: tune/faq | |||
- file: tune/api_docs/overview.rst | |||
- file: tune/api/api.rst |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just checking, are you keeping Tune Internals
and Tune Client API
unchanged intentionally?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, for Tune Internals, I wasn't sure how to list out all members/methods with their docstrings if I used autosummary. And since that section is not really meant for external users to search for and use as API calls, I decided to leave it fully expanded.
For Tune Client, there was only 1 class, and I think it is fine as is.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ack, though we should probably move Callback
and PlacementGroupFactory
out of Tune Internals
.
I think it would make sense to move PlacementGroupFactory
directly into the Trainable Utilities
section, next to with_resources
.
Callback
is a bit strange... it's a public tune
API, which exposes internals about the trials, and is used by air.RunConfig
... we should probably revisit this down the line.
Thoughts?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moved Callback + PGF to better places.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Clicked through several docs, and looks great to me, thanks @justinvyu!
Just FYI #32307 for Serve API is just merged, so rebasing to master should resvole the conflict here. |
Signed-off-by: Justin Yu <[email protected]>
Signed-off-by: Justin Yu <[email protected]>
Signed-off-by: Justin Yu <[email protected]>
Signed-off-by: Justin Yu <[email protected]>
Signed-off-by: Justin Yu <[email protected]>
…/api_restructure
Signed-off-by: Justin Yu <[email protected]>
@maxpumperla Do you know why these errors are showing up?
The links all work fine, and fit is not missing in either of the generated autosummary/autofunctions. Update: For now, I have changed this section back to what it was before (not showing any inherited members). |
Signed-off-by: Justin Yu <[email protected]>
…/api_restructure
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@richardliaw can you merge?
* [Tune][Doc] Restructure API reference (#32311) * [Docs] Fix broken Tune links to overview and intergration (#32442) * Remove can_restore (exists on master but not releases/2.3.0) Signed-off-by: Justin Yu <[email protected]> --------- Signed-off-by: Justin Yu <[email protected]> Co-authored-by: Artur Niederfahrenhorst <[email protected]>
This PR splits up long API refs in AIR and Train into individual pages, one dedicated to each method/class. This PR is a followup to #31204 and #32311, which made the same changes for Ray Data/Tune docs. Signed-off-by: Justin Yu <[email protected]>
This PR splits up long API refs in AIR and Train into individual pages, one dedicated to each method/class. This PR is a followup to ray-project#31204 and ray-project#32311, which made the same changes for Ray Data/Tune docs. Signed-off-by: Justin Yu <[email protected]>
This PR splits up long API refs in AIR and Train into individual pages, one dedicated to each method/class. This PR is a followup to #31204 and #32311, which made the same changes for Ray Data/Tune docs. Signed-off-by: Justin Yu <[email protected]>
Signed-off-by: Edward Oakes <[email protected]>
This PR splits up long API refs in AIR and Train into individual pages, one dedicated to each method/class. This PR is a followup to ray-project#31204 and ray-project#32311, which made the same changes for Ray Data/Tune docs. Signed-off-by: Justin Yu <[email protected]> Signed-off-by: Edward Oakes <[email protected]>
This PR splits up long API refs in AIR and Train into individual pages, one dedicated to each method/class. This PR is a followup to ray-project#31204 and ray-project#32311, which made the same changes for Ray Data/Tune docs. Signed-off-by: Justin Yu <[email protected]> Signed-off-by: elliottower <[email protected]>
Why are these changes needed?
This PR splits up long API refs into individual pages, one dedicated to each method/class. There are now 3 layers: an index page (ex:
doc/tune/api/api.rst
), a summary page for each group of APIs (ex:doc/tune/api/trainable.rst
), and an individual page for each API (ex:doc/tune/api/docs/tune.Trainable.rst
).This PR is a followup to #31204, which made the same changes for Ray Data docs.
Related issue number
Checks
git commit -s
) in this PR.scripts/format.sh
to lint the changes in this PR.