-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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] Cleanup examples folder vol 32: Enable RLlib + Serve example in CI and translate to new API stack. #48687
[RLlib] Cleanup examples folder vol 32: Enable RLlib + Serve example in CI and translate to new API stack. #48687
Conversation
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.
LGTM. For the future we should extend this example by a connector run as this will probably be the default in practice.
action = self.algo.compute_single_action(obs) | ||
# Compute and return the action for the given observation (create a batch | ||
# with B=1 and convert to torch). | ||
output = self.rl_module.forward_inference( |
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.
For a better practical usability we might need to enlarge this example by a connector run. This might be the default we will see in practice.
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.
Yeah, makes sense!
Maybe add another example where we restore the EnvToModule pipeline + the RLModule.
Like we do in the ray.rllib.examples.inference.policy_inference_after_training_w_connector.py
script.
episode_return += reward | ||
|
||
# If episode done -> reset to get initial observation of new episode. | ||
if done: | ||
if terminated or truncated: |
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.
Awesome example!!
…le_rllib_plus_serve_example_in_ci
…in CI and translate to new API stack. (ray-project#48687) Signed-off-by: JP-sDEV <jon.pablo80@gmail.com>
…in CI and translate to new API stack. (ray-project#48687) Signed-off-by: mohitjain2504 <mohit.jain@dream11.com>
Cleanup examples folder vol 32: Enable RLlib + Serve example in CI and translate to new API stack.
Why are these changes needed?
Related issue number
Checks
git commit -s
) in this PR.scripts/format.sh
to lint the changes in this PR.method in Tune, I've added it in
doc/source/tune/api/
under thecorresponding
.rst
file.