-
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; Offline RL] 2. Multiple optimizations for streaming data. #49195
[RLlib; Offline RL] 2. Multiple optimizations for streaming data. #49195
Conversation
…, removed default read arguments in 'OfflineData' to always use Ray Data's optimized reads (specifically on the product). Moved call to schema to debug logging in 'OfflineData' to avoid any further overhead when loading a dataset. Signed-off-by: simonsays1980 <[email protected]>
Signed-off-by: simonsays1980 <[email protected]>
…urthermore, removed learner and locality hints from multi-learner setups b/c we do not need them for the time being and actor handles cannot get serialized. Signed-off-by: simonsays1980 <[email protected]>
…Furthermore, removed 'num_cpus' from 'map_batches' as it was blocking execution with multi-learner multi-node setups. In addition modified all #args.num_learner' usages. Signed-off-by: simonsays1980 <[email protected]>
…educe overhead costs. Signed-off-by: simonsays1980 <[email protected]>
…ws iterating over batches down as long as it is not fixed in Ray Data. Signed-off-by: simonsays1980 <[email protected]>
Signed-off-by: simonsays1980 <[email protected]>
…d anymore. Signed-off-by: simonsays1980 <[email protected]>
Signed-off-by: simonsays1980 <[email protected]>
@@ -146,8 +147,7 @@ def sample( | |||
# Add constructor `kwargs` when using remote learners. | |||
fn_constructor_kwargs.update( | |||
{ | |||
"learner": self.learner_handles, | |||
"locality_hints": self.locality_hints, | |||
"learner": None, |
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.
Wait, what changed here?
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.
Locality hints are gone. The learner will go in a third PR blocked by the Ray Data w/ Ray Tune issue
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.
Looks good. Just a handful of questions ...
…s and modified tests. Signed-off-by: simonsays1980 <[email protected]>
…need it anymore. Signed-off-by: simonsays1980 <[email protected]>
…guments in the 'OfflinePreLearner'. Signed-off-by: simonsays1980 <[email protected]>
… b/c test was failing. Signed-off-by: simonsays1980 <[email protected]>
@@ -193,7 +192,7 @@ def test_offline_prelearner_sample_from_old_sample_batch_data(self): | |||
algo = self.config.build() | |||
# Build the `OfflinePreLearner` and add the learner. | |||
oplr = OfflinePreLearner( | |||
self.config, | |||
config=self.config, |
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!
@@ -74,7 +74,7 @@ def test_offline_prelearner_buffer_class(self): | |||
algo = self.config.build() | |||
# Build the `OfflinePreLearner` and add the learner. | |||
oplr = OfflinePreLearner( | |||
self.config, | |||
config=self.config, |
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!
@@ -84,9 +84,9 @@ class OfflinePreLearner: | |||
@OverrideToImplementCustomLogic_CallToSuperRecommended | |||
def __init__( | |||
self, | |||
*, |
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.
thanks!
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 now. Thanks @simonsays1980 !
…y-project#49195) Signed-off-by: ujjawal-khare <[email protected]>
Why are these changes needed?
Streaming data directly from cloud storage showed still low performance. This PR comes with multiple optimizations to train Offline RL agents in a truly streaming way, i.e. starting training after the first chunks of data are read and preprocessed. The following changes were made:
schema
calls.locality_hints
fromOfflinePreLearner
as this is not used anymore.tuned_examples
and tests.RLUnplugged
example toSPREAD
scheduling strategy when using multiple learners on a multi-node cluster.ConnectorV2
to read stacked and encoded Atari framesRelated issue number
Related to #49194
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.