Skip to content

Sequential memory sampling #311

@elle-miller

Description

@elle-miller

Description

Hi,

In the PPO implementation, the update uses minibatches from sample_all function of Memory which are sequentially sampled e.g. [1,2,3,4,5,6......].

https://github.com/Toni-SM/skrl/blob/main/skrl/memories/torch/base.py#L327C9-L327C19

Was this intentional? I thought the sampling should be random, to avoid temporal correlations in the data e.g. point 6

I'm seeing minor improvements in my particular environment, but have not run conclusive multiseed tests.

if random:
     indexes = RandomSampler(indexes)

batches = BatchSampler(indexes, batch_size=len(indexes) // mini_batches, drop_last=True)

Just a heads up!

What skrl version are you using?


What ML framework/library version are you using?

No response

Additional system information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions