-
Notifications
You must be signed in to change notification settings - Fork 6.1k
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] POC: Run RLlib w/o Preprocessors setup. #17656
Closed
sven1977
wants to merge
68
commits into
ray-project:master
from
sven1977:deprecate_preprocessors_soft
Closed
Changes from all commits
Commits
Show all changes
68 commits
Select commit
Hold shift + click to select a range
8841ad8
wip
sven1977 122bcbc
wip
sven1977 c9f7769
Merge branch 'master' of https://github.com/ray-project/ray into samp…
sven1977 bbc806b
wip
sven1977 54394cb
Merge branch 'sample_batch_supports_complex_spaces' into deprecate_pr…
sven1977 7b9c86e
wip
sven1977 8b50495
Merge branch 'master' of https://github.com/ray-project/ray into samp…
sven1977 1b52cd8
wip.
sven1977 674fb23
wip.
sven1977 88c8e95
fix.
sven1977 59646fd
Merge branch 'master' into deprecate_preprocessors_soft
sven1977 88408f9
Merge branch 'sample_batch_supports_complex_spaces' into deprecate_pr…
sven1977 a4b6458
Merge branch 'master' of https://github.com/ray-project/ray into samp…
sven1977 da1fef7
Merge branch 'master' of https://github.com/ray-project/ray into samp…
sven1977 68e81fe
wip.
sven1977 dd858c6
Merge branch 'master' of https://github.com/ray-project/ray into samp…
sven1977 90b3735
wip.
sven1977 1cc1c87
wip.
sven1977 941c0e0
Merge branch 'master' of https://github.com/ray-project/ray into samp…
sven1977 4ebcdad
wip.
sven1977 40bb3d3
wip.
sven1977 8aa3015
wip.
sven1977 5e1a769
Merge branch 'sample_batch_supports_complex_spaces' into deprecate_pr…
sven1977 9f787dd
wip.
sven1977 3d719d0
wip and LINT.
sven1977 a40667c
Merge branch 'master' of https://github.com/ray-project/ray into depr…
sven1977 97182ab
fix.
sven1977 c664afa
fix.
sven1977 e810da5
fixes.
sven1977 f62abc1
Merge branch 'master' of https://github.com/ray-project/ray into depr…
sven1977 2980346
fixes.
sven1977 1796934
Merge branch 'master' of https://github.com/ray-project/ray into depr…
sven1977 481ed04
wip.
sven1977 a72a7c0
wip.
sven1977 7a4c678
Merge branch 'master' of https://github.com/ray-project/ray into depr…
sven1977 5de2cae
wip.
sven1977 a2d4069
Merge branch 'master' of https://github.com/ray-project/ray into depr…
sven1977 4e88450
wip.
sven1977 d911780
Merge branch 'master' of https://github.com/ray-project/ray into depr…
sven1977 f44a6c3
fixes
sven1977 3d7c37d
fixes
sven1977 d9f0af9
fixes.
sven1977 4e8da9e
fix.
sven1977 59fa8a4
Add "env_id" and "t" to SampleBatch as consts.
sven1977 cce8ccb
Merge branch 'master' of https://github.com/ray-project/ray into seq_…
sven1977 78e1472
Fix.
sven1977 2253d58
Merge branch 'seq_lens_as_sample_batch_constant' into deprecate_prepr…
sven1977 8fcb9cf
wip.
sven1977 392dd1e
merge
sven1977 c3d9d5a
LINT.
sven1977 2a80b9d
Merge branch 'master' of https://github.com/ray-project/ray into depr…
sven1977 a4e9744
LINT.
sven1977 7959e64
wip.
sven1977 cf3c9dc
wip.
sven1977 9a3cfb8
Merge branch 'master' of https://github.com/ray-project/ray into depr…
sven1977 90083b6
fix.
sven1977 405e0ce
Merge branch 'master' of https://github.com/ray-project/ray into depr…
sven1977 4825e27
wip.
sven1977 e928f73
Merge branch 'master' of https://github.com/ray-project/ray into depr…
sven1977 6c0ad15
wip.
sven1977 3b4f644
wip.
sven1977 956fc88
Merge branch 'master' of https://github.com/ray-project/ray into depr…
sven1977 60aa649
wip
sven1977 6d822db
wip
sven1977 29695e0
wip
sven1977 fb50d81
wip
sven1977 fa8f54f
wip
sven1977 d294729
wip
sven1977 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -185,15 +185,17 @@ | |
# Tuple[value1, value2]: Clip at value1 and value2. | ||
"clip_rewards": None, | ||
# If True, RLlib will learn entirely inside a normalized action space | ||
# (0.0 centered with small stddev; only affecting Box components) and | ||
# only unsquash actions (and clip just in case) to the bounds of | ||
# env's action space before sending actions back to the env. | ||
# (0.0 centered with small stddev; only affecting Box components). | ||
# We will unsquash actions (and clip, just in case) to the bounds of | ||
# the env's action space before sending actions back to the env. | ||
"normalize_actions": True, | ||
# If True, RLlib will clip actions according to the env's bounds | ||
# before sending them back to the env. | ||
# TODO: (sven) This option should be obsoleted and always be False. | ||
"clip_actions": False, | ||
# Whether to use "rllib" or "deepmind" preprocessors by default | ||
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. Maybe describe what rllib or deepmind does in the comment. |
||
# Set to None for using no preprocessor. In this case, the model will have | ||
# to handle possibly complex observations from the environment. | ||
"preprocessor_pref": "deepmind", | ||
|
||
# === Debug Settings === | ||
|
@@ -1001,7 +1003,7 @@ def compute_single_action( | |
|
||
# Check the preprocessor and preprocess, if necessary. | ||
pp = local_worker.preprocessors[policy_id] | ||
if type(pp).__name__ != "NoPreprocessor": | ||
if pp and type(pp).__name__ != "NoPreprocessor": | ||
observation = pp.transform(observation) | ||
filtered_observation = local_worker.filters[policy_id]( | ||
observation, update=False) | ||
|
@@ -1474,6 +1476,12 @@ def _validate_config(config: PartialTrainerConfigDict, | |
config["input_evaluation"])) | ||
|
||
# Check model config. | ||
# If no preprocessing, propagate into model's config as well | ||
# (so model will know, whether inputs are preprocessed or not). | ||
if config["preprocessor_pref"] is None: | ||
model_config["_no_preprocessor"] = True | ||
|
||
# Prev_a/r settings. | ||
prev_a_r = model_config.get("lstm_use_prev_action_reward", | ||
DEPRECATED_VALUE) | ||
if prev_a_r != DEPRECATED_VALUE: | ||
|
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
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.
Prob should be in diff PR