mani_skill.envs.utils.randomization.batched_rng#

Code implementation for a batched random number generator. The goal is to enable seeding a batched random number generator with a batch of seeds to ensure randomization in CPU simulators and GPU simulators are the same

Classes#

Module Contents#

class mani_skill.envs.utils.randomization.batched_rng.BatchedRNG(rngs)[source]#

Bases: numpy.random.RandomState

Parameters:

rngs (list) –

__getattribute__(item)[source]#
__getitem__(idx)[source]#
Parameters:

idx (Union[int, list[int], numpy.ndarray]) –

__setitem__(idx, value)[source]#
Parameters:
  • idx (Union[int, list[int], numpy.ndarray]) –

  • value (Union[numpy.random.RandomState, list[numpy.random.RandomState]]) –

classmethod from_rngs(rngs)[source]#
Parameters:

rngs (list) –

classmethod from_seeds(seeds, backend='numpy:random_state')[source]#
Parameters:
  • seeds (list[int]) –

  • backend (str) –

batch_size[source]#
rngs[source]#