unienv_data.storages.transformation¶
Classes:
| Name | Description |
|---|---|
TransformedStorage |
|
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],
cache_filename: Optional[Union[str, PathLike]] = None,
)
Bases: SpaceStorage[BatchT, BArrayType, BDeviceType, BDtypeType, BRNGType]
Methods:
Attributes:
| Name | Type | Description |
|---|---|---|
single_file_ext |
|
|
inner_storage |
|
|
inner_storage_path |
|
|
data_transformation |
|
|
inv_data_transformation |
|
|
cache_filename |
Optional[Union[str, PathLike]]
|
|
capacity |
Optional[int]
|
|
has_open_segment |
bool
|
|
pending_segment_length |
int
|
|
is_mutable |
bool
|
|
is_multiprocessing_safe |
bool
|
|
backend |
ComputeBackend[BArrayType, BDeviceType, BDtypeType, BRNGType]
|
|
device |
Optional[BDeviceType]
|
|
single_instance_space |
|
inv_data_transformation
instance-attribute
¶
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]