import pandas as pd
from fastrl.pipes.core import *
from fastrl.pipes.map.transforms import *
from fastrl.envs.gym import GymTypeTransform,GymStepper,GymTransformBlockVisualizers
Iterable pipes for displaying environments as they run using
typing.NamedTuples with image fields
SimpleJupyterVideoPlayer
SimpleJupyterVideoPlayer (*args, **kwds)
Displays video from a source_datapipe that produces typing.NamedTuples that contain an image field. This only can handle 1 env input.
ImageCollector
ImageCollector (*args, **kwds)
LogCollector specifically manages finding and attaching itself to LoggerBases found earlier in the pipeline.
video_logger = SimpleJupyterVideoPlayer()
pipe = GymTransformBlock(None,n=100,seed=0,include_images=True)(['CartPole-v1'])
pipe = LoggerBasePassThrough(pipe,[video_logger])
pipe = ImageCollector(pipe)
pipe = video_logger.connect_source_datapipe(pipe)
L(pipe);