Ejemplo n.º 1
0
    def _extract_all_data(
        source_frames: Iterator[Tuple[Frame, ULID]],
        pbar: Tqdm,
    ) -> FrameDataGenerator:
        for frame, frame_id in source_frames:
            for sensor_name, data in frame.items():
                if isinstance(data, RemoteData):
                    pbar.update()
                    continue

                yield data, sensor_name, frame_id.str
Ejemplo n.º 2
0
    def _extract_unuploaded_data(
            source_frames: Iterator[Tuple[Frame, ULID]], pbar: Tqdm, *,
            done_frames: Dict[float, Frame]) -> FrameDataGenerator:
        for frame, frame_id in source_frames:
            done_frame = done_frames.get(frame_id.timestamp().timestamp)
            if done_frame:
                frame_id = done_frame.frame_id
            for sensor_name, data in frame.items():
                if isinstance(data, RemoteData):
                    pbar.update()
                    continue

                if (done_frame and sensor_name in done_frame
                        and done_frame[sensor_name].path
                        == data.target_remote_path):
                    pbar.update()
                    continue

                yield data, sensor_name, frame_id.str