-
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
Merged
sven1977
merged 16 commits into
ray-project:master
from
simonsays1980:offline-rl-streaming-optimizations
Dec 13, 2024
Merged
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
2f526cc
Optimized RLUnplugged benchmark example and changed name. Furthermore…
simonsays1980 df8afbe
Adapted all tuned examples to the optimizations made in this branch.
simonsays1980 5a179ae
Removed call for schema completely to not hurt perforamance anyhow. F…
simonsays1980 a407064
Added a scheduling strategy for multi-node and multi-learner setups. …
simonsays1980 af757e8
Changed dataset iterations per learner to a higher value to improve r…
simonsays1980 716fa69
Removed local shuffle buffer from 'OfflineData''s defaults b/c it slo…
simonsays1980 db07517
Merged master and resolved conflicts.
simonsays1980 c296b56
Removed 'locality_hints' from 'OfflinePreLearner' b/c it is not neede…
simonsays1980 1d9e02c
Removed unused customization in 'RLUnplugged' example.
simonsays1980 55d11a4
Merge branch 'master' into offline-rl-streaming-optimizations
simonsays1980 929f6f7
Changed the signature of the 'OfflinePreLearner' to force keyword arg…
simonsays1980 68dfd70
Removed ALE syntax in RLUnplugged example b/c gymnasium 1.x does not …
simonsays1980 6904042
Merge branch 'master' into offline-rl-streaming-optimizations
simonsays1980 45924b5
Fixed small bug in MARWIL test file that was due to forced keyword ar…
simonsays1980 48df937
Merge branch 'master' into offline-rl-streaming-optimizations
simonsays1980 5827253
Added keyword to first argument in 'OfflinePreLearner' initialisation…
simonsays1980 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -84,9 +84,9 @@ class OfflinePreLearner: | |
@OverrideToImplementCustomLogic_CallToSuperRecommended | ||
def __init__( | ||
self, | ||
*, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. thanks! |
||
config: "AlgorithmConfig", | ||
learner: Union[Learner, list[ActorHandle]], | ||
locality_hints: Optional[List[str]] = None, | ||
simonsays1980 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
spaces: Optional[Tuple[gym.Space, gym.Space]] = None, | ||
module_spec: Optional[MultiRLModuleSpec] = None, | ||
module_state: Optional[Dict[ModuleID, Any]] = None, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 commentThe reason will be displayed to describe this comment to others. Learn more. nice! |
||
learner=algo.offline_data.learner_handles[0], | ||
) | ||
|
||
|
@@ -164,7 +164,6 @@ def test_offline_prelearner_in_map_batches(self): | |
).iter_batches( | ||
batch_size=10, | ||
prefetch_batches=1, | ||
local_shuffle_buffer_size=100, | ||
) | ||
|
||
# Now sample a single batch. | ||
|
@@ -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 commentThe reason will be displayed to describe this comment to others. Learn more. nice! |
||
learner=algo.offline_data.learner_handles[0], | ||
) | ||
# Now, pull a batch of defined size formt he dataset. | ||
|
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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