rlmesh.Reader

classfrom rlmesh import Reader[source]

A resolved, role-addressed read over an env's observations (read-only).

Reader(adapter: Any, roles: tuple[str, ...], bridge: ValueBridge)

Built by Session.reader(). Calling it maps one raw env observation to a {role: value} dict, each value in the encoding its read item declared – a bare role keeps the env’s native encoding; an Image / State leaf converts (Image(IMAGE_PRIMARY, layout="hwc") yields an HWC image whatever the env stores). It is the same adapter pipeline a model uses, pointed at the consumer: resolved once, reused every step, and identical in the native core. Values come back in the env’s own framework (numpy for a gym env, torch for a torch route).

roles

property[source]
property roles: tuple[str, ...]

The roles this reader extracts, in declaration order.