reagent.gym.datasets package
Submodules
reagent.gym.datasets.episodic_dataset module
- class reagent.gym.datasets.episodic_dataset.EpisodicDataset(env: reagent.gym.envs.gym.Gym, agent: reagent.gym.agents.agent.Agent, num_episodes: int, seed: int = 0, max_steps: Optional[int] = None)
Bases:
torch.utils.data.dataset.IterableDataset- reinforce_type(expected_type)
Reinforce the type for DataPipe instance. And the ‘expected_type’ is required to be a subtype of the original type hint to restrict the type requirement of DataPipe instance.
reagent.gym.datasets.replay_buffer_dataset module
- class reagent.gym.datasets.replay_buffer_dataset.OfflineReplayBufferDataset(env: reagent.gym.envs.env_wrapper.EnvWrapper, replay_buffer: reagent.replay_memory.circular_replay_buffer.ReplayBuffer, batch_size: int, num_batches: int, trainer_preprocessor=None)
Bases:
torch.utils.data.dataset.IterableDatasetSimply sampling from the replay buffer
- classmethod create_for_trainer(trainer, env: reagent.gym.envs.env_wrapper.EnvWrapper, replay_buffer: reagent.replay_memory.circular_replay_buffer.ReplayBuffer, batch_size: int, num_batches: int, trainer_preprocessor=None, device=None)
- reinforce_type(expected_type)
Reinforce the type for DataPipe instance. And the ‘expected_type’ is required to be a subtype of the original type hint to restrict the type requirement of DataPipe instance.
- class reagent.gym.datasets.replay_buffer_dataset.ReplayBufferDataset(env: reagent.gym.envs.env_wrapper.EnvWrapper, agent: reagent.gym.agents.agent.Agent, replay_buffer: reagent.replay_memory.circular_replay_buffer.ReplayBuffer, batch_size: int, training_frequency: int = 1, num_episodes: Optional[int] = None, max_steps: Optional[int] = None, post_episode_callback: Optional[Callable] = None, trainer_preprocessor=None, replay_buffer_inserter=None)
Bases:
torch.utils.data.dataset.IterableDataset- classmethod create_for_trainer(trainer, env: reagent.gym.envs.env_wrapper.EnvWrapper, agent: reagent.gym.agents.agent.Agent, replay_buffer: reagent.replay_memory.circular_replay_buffer.ReplayBuffer, batch_size: int, training_frequency: int = 1, num_episodes: Optional[int] = None, max_steps: Optional[int] = None, post_episode_callback: Optional[Callable] = None, trainer_preprocessor=None, replay_buffer_inserter=None, device=None)
- reinforce_type(expected_type)
Reinforce the type for DataPipe instance. And the ‘expected_type’ is required to be a subtype of the original type hint to restrict the type requirement of DataPipe instance.