Torch Ops, Multi-ROM support, Multi-step support for macro-actions#681
Closed
AdrianOrenstein wants to merge 15 commits into
Closed
Torch Ops, Multi-ROM support, Multi-step support for macro-actions#681AdrianOrenstein wants to merge 15 commits into
AdrianOrenstein wants to merge 15 commits into
Conversation
…een, with gamma 1 and rewards to zero. gammas and paddle strengths support scalar or vector inputs.
…_py[torch] optional extra, docstrings.
Member
|
Thanks for the PR @AdrianOrenstein, I've had similar ideas however I want to merge #652 first to resolve a couple of underlying issues with the vectorizers before adding more interesting features. |
Author
|
Yep. I'll branch off of the commit you mentioned. |
Author
|
I see the #652 is merged, i'll start on this PR |
Author
|
multi-rom has moved to #694 with a number of changes from this PR. |
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.
Torch Ops, Multi-ROM support, Multi-step support for macro-actions
Variable-length actions (
step/send)step()accepts a list of per-env action arrays in addition to a flat array. Each env executes its sequence forlen(seq) * frame_skipraw frames, accumulating gamma-discounted rewards.info["steps_taken"]reports how many steps each env ran. Empty sequences return the last observation with zero reward.Note: if an empty list is sent to the environment, gamma should be set to 1 for that rom step.
Multi-ROM environments
gameaccepts a list of ROM names: each env runs a different game.num_envsis inferred from the list length.num_actionsandaction_setare per-env. The vectoraction_spaceisTuple(Discrete(n_i) ...)with per-env bounds;single_action_spaceisDiscrete(max(num_actions))for compatibility.PyTorch custom ops (
env.torch())Returns
ale::send,ale::recv, andale::send_sequencesas registered torch custom ops withEffectType.ORDERED. Buffers are CPU-pinned for async GPU transfer. Compatible withtorch.compile(fullgraph=True).TorchOpsWrapperwraps an env with bound op methods. XLA ops moved into_xla_ops.py.Bug fixes
recv()instead of never raising an error.frameskip=1+maxpool=Truenow correctly pools the current frame against the previous one.