-
Notifications
You must be signed in to change notification settings - Fork 6k
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 do-over (new API stack): Prep. RLModule; introduce Default[algo]RLModule
classes (rename from [algo]RLModule
).
#49366
[RLlib] Docs do-over (new API stack): Prep. RLModule; introduce Default[algo]RLModule
classes (rename from [algo]RLModule
).
#49366
Conversation
Default[algo]RLModule
classes (rename from [algo]RLModule
).Default[algo]RLModule
classes (rename from [algo]RLModule
).
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. Some nice changes that clarify a bit more that users can start from our default RL modules for customization.
) | ||
|
||
|
||
class DefaultAPPORLModule(DefaultPPORLModule, TargetNetworkAPI, abc.ABC): |
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 like this default naming. Do we apply it to all algorithms now? That would be great!
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, exactly, that's the idea! Only DQN and SAC missing, I think ...
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.
DQN and the rest will be done in the next PR (already in review ...)
|
||
return RLModuleSpec( | ||
module_class=BCTorchRLModule, | ||
module_class=DefaultBCTorchRLModule, |
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!
@@ -119,11 +119,6 @@ def forward_target(self, batch: Dict[str, Any]) -> Dict[str, Any]: | |||
), | |||
) | |||
|
|||
# TODO (simon): DQN Rainbow does not support RNNs, yet. |
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.
This comes with the sequence sampling PR. Have to finish it.
self.encoder = self.catalog.build_actor_critic_encoder(framework=self.framework) | ||
self.pi = self.catalog.build_pi_head(framework=self.framework) | ||
self.vf = self.catalog.build_vf_head(framework=self.framework) | ||
# __sphinx_doc_end__ |
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.
Do we still need this sphinx logic here? All other modules don't have it.
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.
So far yes. A follow up PR will redo the rst files and the example codes. WIP ...
@@ -69,8 +69,9 @@ def __init__(self, config: AlgorithmConfig): | |||
self.filesystem_object = self.filesystem | |||
elif self.filesystem is not None: | |||
raise ValueError( | |||
f"Unknown filesystem: {self.filesystem}. Filesystems can be " | |||
"'gcs' for GCS, 's3' for S3, or 'abs'" | |||
f"Unknown `config.input_filesystem` {self.filesystem}! Filesystems " |
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.
Nice.
…_redo_rl_module_001_default_rl_modules
Introduce
Default[algo]RLModule
classes (rename from[algo]RLModule
).ValueFunctionAPI
. The user does NOT have to subclass a PPO-specific superclass anymore freeing them from hidden/confusing/underlying implementation details, such asWhy 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.