DataLoadWorker

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

Data loading worker used to map states to actual observations.

static run(dataset_cls: Type[InMemoryDataset], env_factory: Callable, trajectories_or_paths: List[Path | str | TrajectoryRecord], reporting_queue: Queue, trajectory_processor: TrajectoryProcessor) None

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

Parameters:
  • dataset_cls – The class of the InMemoryDataset used.

  • 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.

  • trajectory_processor – A trajectory processor class.