DataLoadWorker

class maze.core.trajectory_recording.datasets.in_memory_dataset.DataLoadWorker

Data loading worker used to map states to actual observations.

static run(env_factory: Callable, trajectories_or_paths: List[Union[pathlib.Path, str, maze.core.trajectory_recording.records.trajectory_record.TrajectoryRecord]], reporting_queue: multiprocessing.context.BaseContext.Queue)None

Load trajectory data from the provided trajectory file paths. Report exceptions to the main process.

Parameters
  • env_factory – Function for creating an environment for MazeState and MazeAction conversion.

  • trajectories_or_paths – Either file paths to load, or already loaded trajectories to convert.

  • reporting_queue – Queue for reporting loaded data and exceptions back to the main process.