unienv_data.storages.transformation¶
TransformedStorage
¶
TransformedStorage(single_instance_space: Space[Any, BDeviceType, BDtypeType, BRNGType], data_transformation: DataTransformation, inner_storage: SpaceStorage[BArrayType, BArrayType, BDeviceType, BDtypeType, BRNGType], inner_storage_path: Union[str, PathLike])
Bases: SpaceStorage[BatchT, BArrayType, BDeviceType, BDtypeType, BRNGType]
inv_data_transformation
instance-attribute
¶
inv_data_transformation = direction_inverse(single_instance_space)
cache_filename
class-attribute
instance-attribute
¶
cache_filename: Optional[Union[str, PathLike]] = None
Can the storage instance be safely used in multiprocessing environments after creation? If True, the storage can be used in multiprocessing environments.
create
classmethod
¶
create(single_instance_space: Space[Any, BDeviceType, BDtypeType, BRNGType], inner_storage_cls: Type[SpaceStorage[BArrayType, BArrayType, BDeviceType, BDtypeType, BRNGType]], *args, data_transformation: DataTransformation, capacity: Optional[int] = None, cache_path: Optional[str] = None, multiprocessing: bool = False, inner_storage_kwargs: Dict[str, Any] = {}, **kwargs) -> TransformedStorage[BArrayType, BDeviceType, BDtypeType, BRNGType]
load_from
classmethod
¶
load_from(path: Union[str, PathLike], single_instance_space: Space[Any, BDeviceType, BDtypeType, BRNGType], *, capacity: Optional[int] = None, read_only: bool = True, multiprocessing: bool = False, **kwargs) -> TransformedStorage[BArrayType, BDeviceType, BDtypeType, BRNGType]