[RLlib] Attention Net prep PR #2: Smaller cleanups.#12449
Merged
sven1977 merged 11 commits intoray-project:masterfrom Dec 1, 2020
Merged
[RLlib] Attention Net prep PR #2: Smaller cleanups.#12449sven1977 merged 11 commits intoray-project:masterfrom
sven1977 merged 11 commits intoray-project:masterfrom
Conversation
6 tasks
…ntion_nets_prep_2
…ntion_nets_prep_2
sven1977
commented
Nov 28, 2020
| # OBS are already shifted by -1 (the initial obs starts one ts | ||
| # before all other data columns). | ||
| shift = view_req.shift - \ | ||
| shift = view_req.data_rel_pos - \ |
Contributor
Author
There was a problem hiding this comment.
Renamed this b/c this will support (in the upcoming PRs) not just a single shift (int), but also:
- list of ints (include not just one ts in this view, but several)
- a range string, e.g. "-50:-1" (will be used by attention nets and Atari framestacking).
sven1977
commented
Nov 28, 2020
|
|
||
| def add_init_obs(self, episode_id: EpisodeID, agent_id: AgentID, | ||
| env_id: EnvID, init_obs: TensorType, | ||
| def add_init_obs(self, episode_id: EpisodeID, agent_index: int, |
Contributor
Author
There was a problem hiding this comment.
- agent_id vs agent_idx was a bug
- added timestep
…ntion_nets_prep_2
ericl
reviewed
Nov 30, 2020
| data_col: Optional[str] = None, | ||
| space: gym.Space = None, | ||
| shift: Union[int, List[int]] = 0, | ||
| data_rel_pos: Union[int, List[int]] = 0, |
Contributor
There was a problem hiding this comment.
Why not keep it as shift? It seems to be intuitive
Contributor
Author
There was a problem hiding this comment.
I liked shift, too. The problem is, there will also be an abs_pos soon (see attention net PRs). So I wanted to distinguish between these two concepts.
ericl
approved these changes
Nov 30, 2020
ericl
reviewed
Nov 30, 2020
| whether to create those new envs in remote processes instead of | ||
| in the current process. This adds overheads, but can make sense | ||
| if your envs are expensive to step/reset (e.g., for StarCraft). | ||
| Use this cautiously, overheads are significant! |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
The current attention net trajectory view PR (#11729) is too large (>1000 lines added).
Therefore, I'm moving smaller preparatory and cleanup changes into 3 pre-PRs. This is the second one of these. Only review it once this one here (#12447) has been merged.
Why are these changes needed?
Related issue number
Checks
scripts/format.shto lint the changes in this PR.