1
0
mirror of https://github.com/gryf/coach.git synced 2025-12-18 11:40:18 +01:00
Files
coach/rl_coach/graph_managers
x77a1 4da56b1ff2 Enable setting the data store factory in Graph manager (#110)
* Enable setting the data store factory in Graph manager

This change enables us to use custom data store for storing and retrieving models.
We currently need this to have use a data store that loads temporary AWS credentials
from disk before calling store or load operations.

* Removed data store factory and introduced data store as a attribute
2018-11-19 08:35:03 -08:00
..
2018-08-13 17:11:34 +03:00
2018-08-13 17:11:34 +03:00

Block Factory

The block factory is a class which creates a block that fits into a specific RL scheme. Example RL schemes are: self play, multi agent, HRL, basic RL, etc. The block factory should create all the components of the block and return the block scheduler. The block factory will then be used to create different combinations of components. For example, an HRL factory can be later instantiated with:

  • env = Atari Breakout
  • master (top hierarchy level) agent = DDPG
  • slave (bottom hierarchy level) agent = DQN

A custom block factory implementation should look as follows:

class CustomFactory(BlockFactory):
    def __init__(self, custom_params):
        super().__init__()

    def _create_block(self, task_index: int, device=None) -> BlockScheduler:
        """
        Create all the block modules and the block scheduler
        :param task_index: the index of the process on which the worker will be run
        :return: the initialized block scheduler
        """

        # Create env
        # Create composite agents
        # Create level managers
        # Create block scheduler

        return block_scheduler