module emote.memory.adaptors
Classes
class DictObsAdaptor:
Converts multiple observation columns to a single dict observation.
Methods
def __init__(self, keys, output_keys, with_next) -> None
Arguments:
- keys(List[str]): The dictionary keys to extract
- output_keys(Optional[List[str]]): The output names for the extracted keys. Defaults to the same name.
- with_next(bool): If True, adds an extra column called "next_{key}" for each key in keys. (default: True)
def __call__(self, result, count, sequence_length) -> SampleResult
class KeyScaleAdaptor:
An adaptor to apply scaling to a specified sampled key.
Methods
def __init__(self, scale, key) -> None
Arguments:
- scale: The scale factor to apply
- key: The key for which to scale data
def __call__(self, result, count, sequence_length) -> SampleResult
class KeyCastAdaptor:
An adaptor to cast a specified sampled key.
Methods
def __init__(self, dtype, key) -> None
Arguments:
- dtype: The dtype to cast to.
- key: The key for which to cast data
def __call__(self, result, count, sequence_length) -> SampleResult
class TerminalAdaptor:
An adaptor to apply tags from detailed terminal tagging.
Methods
def __init__(self, target_key, value_key) -> None
Arguments:
- target_key(str): the default mask data to override
- value_key(str): the key containing the terminal mask value to apply
def __call__(self, result, count, sequence_length) -> SampleResult