pytorch / pytorch/rl

[Feature Request] partial steps in batches envs

Open
#1,868 1 comment 1 reaction 1 assignee View on GitHub

@vmoens is already working on this.

Since Feb 3, 2024.

enhancement
Dominant language
Python
Stars
3.6k
Forks
487
Avg merge
23h 50m
Merged PRs (30d)
209

Description

Motivation

In many scenarios we need to perform a step only on a subset of batched envs. This includes collecting a complete trajectory for many envs when they end asynchronously, or partial frame skip and such.

Solution

Serial and parallel envs could read an index key that would indicate which env is to be reset/stepped over.
We need to decide if this key will be a bool or long tensor, which name it'll have, whether it'll be private or not.
For sure users will need to be able to mask the data so we'll need to provide a mask indicating what data is valid.

Alternatives

Eventually we could also index batched envs directly but for now this is a long stretch.

Cc @albertbou92

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.