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

[RLlib; docs] RLlib documentation do-over (new API stack): Main index page. #48285

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions doc/source/_includes/rllib/new_api_stack.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.. note::

Ray 2.10.0 introduces the alpha stage of RLlib's "new API stack".
The Ray Team plans to transition algorithms, example scripts, and documentation to the new code base
thereby incrementally replacing the "old API stack" (e.g., ModelV2, Policy, RolloutWorker) throughout the subsequent minor releases leading up to Ray 3.0.
The team is currently transitioning algorithms, example scripts, and
documentation to the new code base throughout the subsequent minor releases leading up to Ray 3.0.

:doc:`See here </rllib/rllib-new-api-stack>` for more details on how to use the new API stack.
:doc:`See here </rllib/rllib-new-api-stack>` for more details on how to activate and use the new API stack.
1 change: 1 addition & 0 deletions doc/source/rllib/images/rllib-new-api-stack-simple.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed doc/source/rllib/images/rllib-stack.png
Binary file not shown.
1 change: 0 additions & 1 deletion doc/source/rllib/images/sigils/new-api-stack.svg

This file was deleted.

1 change: 0 additions & 1 deletion doc/source/rllib/images/sigils/old-api-stack.svg

This file was deleted.

314 changes: 202 additions & 112 deletions doc/source/rllib/index.rst

Large diffs are not rendered by default.

178 changes: 50 additions & 128 deletions doc/source/rllib/rllib-examples.rst

Large diffs are not rendered by default.

7 changes: 5 additions & 2 deletions rllib/examples/inference/policy_inference_after_training.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,10 @@
best_result = results.get_best_result(
metric=f"{ENV_RUNNER_RESULTS}/{EPISODE_RETURN_MEAN}", mode="max"
)
# Create new Algorithm and restore its state from the last checkpoint.
# Create new RLModule and restore its state from the last algo checkpoint.
# Note that the checkpoint for the RLModule can be found deeper inside the algo
# checkpoint's sub-directories ([algo dir] -> "learner/" -> "module_state/" ->
# "[module ID]):
rl_module = RLModule.from_checkpoint(
os.path.join(
best_result.checkpoint.path,
Expand All @@ -147,7 +150,7 @@
)
)

# Create the env to do inference in.
# Create a env to do inference in.
Copy link
Collaborator

Choose a reason for hiding this comment

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

We should bring in here loading the pipelines from checkpoint, too and using them.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We have another example, where we do that (the LSTM one, which requires the connector pipeline for a more sophisticated inference loop w/ state in/outs).

Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
# Create a env to do inference in.
# Create an env to do inference in.

sven1977 marked this conversation as resolved.
Show resolved Hide resolved
env = gym.make(args.env)
obs, info = env.reset()

Expand Down